DocumentationBeylaSetupDeploy in Kubernetes with Helm
Grafana Cloud

Deploy Beyla in Kubernetes with Helm


For more details about the diverse Helm configuration options, check out the Beyla Helm chart options document.

For a step-by-step walkthrough by the basics for Beyla and Kubernetes, you can also follow the Beyla and Kubernetes walkthrough tutorial.


Deploying Beyla from helm

First, you need to add the Grafana helm repository to Helm:

helm repo add grafana

The following command deploys a Beyla DaemonSet with a default configuration in the beyla namespace:

helm install beyla -n beyla --create-namespace  grafana/beyla

The default Beyla configuration:

  • exports the metrics as Prometheus metrics in the Pod HTTP port 9090, /metrics path.
  • tries to instrument all the applications in your cluster.
  • only provides application-level metrics and excludes network-level metrics by default
  • configures Beyla to decorate the metrics with Kubernetes metadata labels, for example or

Configuring Beyla

You might want to override the default configuration of Beyla. For example, to export the metrics and/or spans as OpenTelemetry instead of Prometheus, or to restrict the number of services to instrument.

You can override the default Beyla configuration options with your own values.

For example, create a helm-beyla.yml file with a custom configuration:

    # Contents of the actual Beyla configuration file
        - k8s_namespace: demo
        - k8s_namespace: blog
      unmatched: heuristic

The section contains a Beyla configuration file, documented in the Beyla configuration options documentation.

Then pass the overridden configuration to the helm command with the -f flag. For example:

helm install beyla grafana/beyla -f helm-beyla.yml

or, if the Beyla chart was previously deployed:

helm upgrade beyla grafana/beyla -f helm-beyla.yml

Configuring Beyla metadata

If Beyla exports the data using the Prometheus exporter, you might need to override the Beyla Pod annotations to let it be discoverable by your Prometheus scraper. You can add the following section to the example helm-beyla.yml file:

podAnnotations: "true" "/metrics" "9090"

Analogously, the Helm chart allows overriding names, labels, and annotations for multiple resources involved in the deployment of Beyla, such as service accounts, cluster roles, security contexts, etc. The Beyla Helm chart documentation describes the diverse configuration options.

Providing secrets to the Helm configuration

If you are submitting directly the metrics and traces to Grafana Cloud via the OpenTelemetry Endpoint, you need to provide the credentials via the OTEL_EXPORTER_OTLP_HEADERS environment variable.

The recommended way is to store such value in a Kubernetes Secret and then specify the environment variable referring to it from the Helm configuration.

For example, deploy the following secret:

apiVersion: v1
kind: Secret
  name: grafana-secret
type: Opaque
  otlp-headers: "Authorization=Basic ...."

Then refer to it from the helm-config.yml file via the envValueFrom section:

  OTEL_EXPORTER_OTLP_ENDPOINT: "<...your Grafana Cloud OTLP endpoint URL...>"
      key: otlp-headers
      name: grafana-secret