This is documentation for the next version of Grafana Beyla documentation. For the latest stable release, go to the latest version.

Documentationbreadcrumb arrow Beylabreadcrumb arrow Set upbreadcrumb arrow Kubernetes Monitoring Helm chart
Open source

Deploy Beyla with the Kubernetes Monitoring Helm Chart

This documentation section explains the best practices for deploying Beyla using the Kubernetes Monitoring Helm chart, but specifically for Grafana Cloud Knowledge Graph and Application Observability. For documentation on how to deploy Beyla using the Beyla standalone Helm chart, refer to the Deploy Beyla in Kubernetes with Helm for Grafana Cloud Application Observability documentation section.

Contents:

Deploy Beyla

The easiest way to get started with deploying Beyla with the Kubernetes Monitoring Helm chart is to visit your cloud Kubernetes Monitoring configuration page. For example:

https://<my grafana slug>.grafana.net/a/grafana-k8s-app/configuration?from=now-1h&to=now

In the Containerized application monitoring section, enable Auto Instrumentation -> Metrics of inbound and outbound calls. If you also want to generate OpenTelemetry traces from Beyla directly, you can choose to also enable Forward traces to application receivers.

After choosing your other desired options, the Grafana Cloud Kubernetes Monitoring UI generates a Helm deployment script for you, which contains all the necessary settings for you to get started. The Beyla instrumentation section can be found under the section autoInstrumentation:.

For example:

sh
helm repo add grafana https://grafana.github.io/helm-charts &&
  helm repo update &&
  helm upgrade --install --atomic --timeout 300s grafana-k8s-monitoring grafana/k8s-monitoring \
    --namespace "default" --create-namespace --values - <<'EOF'
cluster:
  name: my-cluster
destinations:
...
autoInstrumentation:
  enabled: true
  beyla:
    deliverTracesToApplicationObservability: false
...
EOF

The Beyla configuration above:

  • exports metrics in a format that can be consumed by Grafana Cloud Knowledge Graph and Application Observability.
  • does not export Beyla traces.
  • tries to instrument all the applications in your cluster.

Configure Beyla

You might want to override the default configuration of Beyla. For example, to choose a subset of your cluster namespaces to instrument or to override the Beyla image used to a newer version.

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

For example, we can modify the autoinstrumentation: configuration section generated by the Kubernetes Monitoring Helm chart to pick and choose what to instrument:

sh
helm repo add grafana https://grafana.github.io/helm-charts &&
  helm repo update &&
  helm upgrade --install --atomic --timeout 300s grafana-k8s-monitoring grafana/k8s-monitoring \
    --namespace "default" --create-namespace --values - <<'EOF'
cluster:
  name: my-cluster
destinations:
...
autoInstrumentation:
  enabled: true
  beyla:
    deliverTracesToApplicationObservability: true
    image: 
      tag: main
    pullPolicy: always
    config:
      data:
        discovery:
          services:
            - k8s_namespace: alpha
            - k8s_namespace: bravo
            - k8s_namespace: delta    
...
EOF

The autoInstrumentation.beyla.config.data section contains a Beyla configuration file, documented in the Beyla configuration options documentation.

In the example above the configuration is modified to:

  1. Enable Beyla traces generation.
  2. We only instrument three namespaces in the cluster: alpha, bravo and delta.
  3. We have chosen to pull the latest main Beyla image.