opentelemetry-ebpf-instrumentation

by OpenTelemetry

Helm chartv0.16.5App v1.0.0Verified publisher

OpenTelemetry eBPF instrumentation Helm chart for Kubernetes

About this chart

OpenTelemetry eBPF Instrumentation Helm Chart

The helm chart installs OpenTelemetry eBPF Instrumentation in kubernetes cluster.

Prerequisites

  • Kubernetes 1.24+
  • Helm 4.0+

Add Repository (can be skipped for OCI repository)

helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update

See helm repo for command documentation.

Install Chart

For HTTPS repository:

helm install opentelemetry-ebpf-instrumentation open-telemetry/opentelemetry-ebpf-instrumentation

For OCI repository:

helm install opentelemetry-ebpf-instrumentation oci://ghcr.io/open-telemetry/opentelemetry-helm-charts/opentelemetry-ebpf-instrumentation

Configuration

The values.yaml file contains information about configuration options for this chart.

OBI Configuration Versions

The chart uses OBI Config v2 by default. An empty config.data renders a v2 configuration with OTLP trace and metric exporters, Prometheus metrics on port 9090, Kubernetes enrichment, and the selected application or network preset.

Config v2 overrides must include its required OBI marker:

config:
  data:
    extensions:
      obi:
        version: "2.0"

The chart merges these overrides with its v2 defaults. Non-empty config.data without the marker is treated as Config v1 and merged with the legacy defaults. This allows existing Config v1 values to continue working while users migrate.

When config.name selects an external ConfigMap, the chart neither converts nor validates its contents. Use explicit service target ports when that external configuration exposes ports that differ from the chart defaults.

Config v2 does not automatically map legacy OTEL_EBPF_* environment variables. Add variables through env or envValueFrom and reference them explicitly from their canonical v2 field with ${VAR}.

Configuring Dynamic cluster_name

The cluster_name configuration can be set dynamically from user-provided values or external resources. Two patterns are supported:

Pattern A: Chart-Managed ConfigMap (Recommended)

Configure the cluster name directly in the chart values. The chart creates a ConfigMap and automatically restarts pods when the value changes:

config:
  create: true
  data:
    extensions:
      obi:
        version: "2.0"
        enrich:
          enrichers:
            kubernetes:
              cluster_name: "my-production-cluster"

This approach will automatically restart OBI pods on any configuration change and is simplest.

Pattern B: External ConfigMap with Manual Restart

Use an existing ConfigMap managed outside the chart:

  1. Create a ConfigMap with the cluster name:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cluster-config
    data:
      cluster_name: "my-production-cluster"
    
  2. Configure the chart to expose the value as an environment variable and reference it from the Config v2 field:

    envValueFrom:
      OBI_CLUSTER_NAME:
        configMapKeyRef:
          name: cluster-config
          key: cluster_name
    config:
      data:
        extensions:
          obi:
            version: "2.0"
            enrich:
              enrichers:
                kubernetes:
                  cluster_name: "${OBI_CLUSTER_NAME}"
    

This approach has the limitation that OBI pod restarts must be triggered manually when the ConfigMap is updated:

kubectl rollout restart daemonset \
  -l app.kubernetes.io/name=opentelemetry-ebpf-instrumentation

See the next section for automating this process.

Dynamic OBI Pod restart

To automatically restart OBI pods when the external ConfigMap changes, add a checksum annotation:

podAnnotations:
  checksum/cluster-config: '{{ (.Files.Get "cluster-config.yaml" | sha256sum) }}'

This requires bundling the ConfigMap definition in the Helm release for checksum evaluation.

Centralizing Kubernetes metadata with k8s-cache

By default each OBI Pod opens its own list/watch connections to the Kubernetes API server to read Pod, Node, and Service metadata for the entire cluster (needed to enrich destination/peer attributes on traces, flows and metrics). On large clusters, or when many OBI replicas run side by side (DaemonSet, large Deployment, sidecars), this fan-out can put significant load on the API server.

k8s-cache is an optional companion Deployment shipped with OBI. It runs the Kubernetes informers once on behalf of every OBI Pod and streams the metadata back over gRPC, so OBI Pods no longer hit the API server for informer traffic.

Note: Even when k8s-cache is enabled, OBI Pods still need their own ServiceAccount and may perform limited direct Kubernetes API lookups for node and cluster metadata. The cache eliminates the per-Pod informer watch traffic, not all API access.

The cache is disabled by default. To enable it, set k8sCache.replicas to a non-zero value:

k8sCache:
  replicas: 1

A single replica is usually enough. For high availability or very large clusters, increase the replica count — OBI Pods load-balance across them through the cache Service and reconnect to a healthy replica on failure.

When k8sCache.replicas > 0 the chart deploys the cache Deployment and Service, and automatically points the OBI DaemonSet at it by setting OTEL_EBPF_KUBE_META_CACHE_ADDRESS to <k8sCache.service.name>:<k8sCache.service.port>. See the k8sCache block in values.yaml for image, resource, metrics and scheduling settings, and the OBI Kubernetes setup guide for background.

Pod Annotations with Template Support

The podAnnotations values support Helm templating, enabling dynamic values:

podAnnotations:
  # Custom static annotation
  custom-annotation: "custom-value"

  # Reference Helm values
  environment: '{{ .Values.environment }}'

  # Reference release info
  release: '{{ .Release.Name }}'

  # Compute checksums for external resources
  checksum/cluster: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'

Values

KeyTypeDefaultDescription
image.registrystring"ghcr.io"Opentelemetry eBPF Instrumentation image registry (defaults to ghcr.io)
image.repositorystring"open-telemetry/opentelemetry-ebpf-instrumentation/ebpf-instrument"Opentelemetry eBPF Instrumentation image repository.
image.tagstring""Opentelemetry eBPF Instrumentation image tag. When empty, the Chart's appVersion is used.
image.digeststring""Opentelemetry eBPF Instrumentation image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override image.tag.
image.pullPolicystring"IfNotPresent"Opentelemetry eBPF Instrumentation image pull policy.
image.pullSecretslist[]Image pull secrets for the agent and, unless overridden by k8sCache.image.pullSecrets, the cache.
nameOverridestring""Overrides the chart's name
fullnameOverridestring""Overrides the chart's computed fullname.
namespaceOverridestring""Override the deployment namespace
annotationsobject{}DaemonSet annotations to apply to all related resources
daemonSetAnnotationsobject{}Annotations to add to the DaemonSet only. Unlike annotations, these are not applied to the ConfigMap, so they do not change the DaemonSet's checksum/config and do not trigger a pod rollout. Takes precedence over annotations if a key is set in both.
initContainerslist[]Init containers to run before the main eBPF instrumentation container
rbac.createbooltrueWhether to create RBAC resources for Opentelemetry eBPF Instrumentation
rbac.extraClusterRoleRuleslist[]Extra custer roles to be created for Opentelemetry eBPF Instrumentation
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.automountbooltrueAutomatically mount a ServiceAccount's API credentials?
serviceAccount.labelsobject{}ServiceAccount labels.
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
podSecurityContextobject{}
privilegedbooltrueIf set to false, deploys an unprivileged / less privileged setup.
contextPropagationobject{"enabled":true}Enables context propagation support.
extraCapabilitieslist[]Extra capabilities for unprivileged / less privileged setup.
securityContextobject{"privileged":true}Security context for privileged setup.
priorityClassNamestring""Priority class name for the pods
service.enabledboolfalsewhether to create a service for metrics
service.typestring"ClusterIP"type of the service
service.annotationsobject{}Annotations for the agent Service and defaults for the cache Service.
service.labelsobject{}Service labels.
service.clusterIPstring""cluster IP
service.loadBalancerIPstring""loadbalancer IP
service.loadBalancerClassstring""loadbalancer class name
service.loadBalancerSourceRangeslist[]source ranges for loadbalancer
service.portint80Prometheus metrics service port
service.targetPortstring""targetPort overrides the Prometheus metrics port derived from the OBI configuration. This value can be either integer or string.
service.portNamestring"metrics"name of the port for Prometheus metrics.
service.appProtocolstring""Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp"
service.nodePortintnilNodePort for the service when type is NodePort. Requires service.type: NodePort
service.externalIPslist[]External IPs to assign to the service
service.externalTrafficPolicystring""External traffic policy (Local or Cluster)
service.internalMetrics.portint8080internal metrics service port
service.internalMetrics.targetPortstring""targetPort overrides the internal metrics port derived from the OBI configuration. This value can be either integer or string.
service.internalMetrics.portNamestring"int-metrics"name of the port for internal metrics.
service.internalMetrics.appProtocolstring""Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp"
service.internalMetrics.nodePortintnilNodePort for internal metrics when type is NodePort. Requires service.type: NodePort
resourcesobject{}
updateStrategy.typestring"RollingUpdate"update strategy type
volumeslist[]Additional volumes on the output daemonset definition.
volumeMountslist[]Additional volumeMounts on the output daemonset definition.
nodeSelectorobject{}The nodeSelector field allows user to constrain which nodes your DaemonSet pods are scheduled to based on labels on the node
tolerationslist[]Tolerations allow pods to be scheduled on nodes with specific taints
affinityobject{}used for scheduling of pods based on affinity rules
podAnnotationsobject{}Adds custom annotations to the Opentelemetry eBPF Instrumentation Pods.
podLabelsobject{}Adds custom labels to the Opentelemetry eBPF Instrumentation Pods.
dnsPolicystring"ClusterFirstWithHostNet"Determines how DNS resolution is handled for that pod. If .Values.preset is set to network or network capture is enabled in .Values.config.data, Opentelemetry eBPF Instrumentation requires hostNetwork access, causing cluster service DNS resolution to fail. It is recommended not to change this if Opentelemetry eBPF Instrumentation sends traces and metrics to Grafana components via k8s service.
config.skipConfigMapCheckboolfalseset to true, to skip the check around the ConfigMap creation
config.createbooltrueset to true to create a ConfigMap from the effective OBI configuration
config.namestring""
config.dataobject{}OpenTelemetry eBPF Instrumentation configuration overrides. An empty map uses the chart's Config v2 defaults. Config v2 is detected by extensions.obi.version: "2.0"; non-empty data without that marker uses the legacy Config v1 defaults. This value is ignored for external ConfigMaps. Supports templating. To escape existing instances of {{ }}, use {{<original content>}}. For example, {{ REDACTED_EMAIL }} becomes {{{{ REDACTED_EMAIL }}}}.
envobject{}Extra environment variables available to the OBI configuration.
envValueFromobject{}extra environment variables to be set from resources such as k8s configMaps/secrets
presetstring"application"Preconfigures some default properties for network or application observability. Accepted

Deploy opentelemetry-ebpf-instrumentation with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has opentelemetry-ebpf-instrumentation on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopentelemetry-ebpf-instrumentation is pinned at v0.16.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply