opentelemetry-ebpf-instrumentation
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:
-
Create a
ConfigMapwith the cluster name:apiVersion: v1 kind: ConfigMap metadata: name: cluster-config data: cluster_name: "my-production-cluster" -
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-cacheis enabled, OBI Pods still need their ownServiceAccountand 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
| Key | Type | Default | Description |
|---|---|---|---|
| image.registry | string | "ghcr.io" | Opentelemetry eBPF Instrumentation image registry (defaults to ghcr.io) |
| image.repository | string | "open-telemetry/opentelemetry-ebpf-instrumentation/ebpf-instrument" | Opentelemetry eBPF Instrumentation image repository. |
| image.tag | string | "" | Opentelemetry eBPF Instrumentation image tag. When empty, the Chart's appVersion is used. |
| image.digest | string | "" | Opentelemetry eBPF Instrumentation image's SHA256 digest (either in format "sha256:XYZ" or "XYZ"). When set, will override image.tag. |
| image.pullPolicy | string | "IfNotPresent" | Opentelemetry eBPF Instrumentation image pull policy. |
| image.pullSecrets | list | [] | Image pull secrets for the agent and, unless overridden by k8sCache.image.pullSecrets, the cache. |
| nameOverride | string | "" | Overrides the chart's name |
| fullnameOverride | string | "" | Overrides the chart's computed fullname. |
| namespaceOverride | string | "" | Override the deployment namespace |
| annotations | object | {} | DaemonSet annotations to apply to all related resources |
| daemonSetAnnotations | object | {} | 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. |
| initContainers | list | [] | Init containers to run before the main eBPF instrumentation container |
| rbac.create | bool | true | Whether to create RBAC resources for Opentelemetry eBPF Instrumentation |
| rbac.extraClusterRoleRules | list | [] | Extra custer roles to be created for Opentelemetry eBPF Instrumentation |
| serviceAccount.create | bool | true | Specifies whether a service account should be created |
| serviceAccount.automount | bool | true | Automatically mount a ServiceAccount's API credentials? |
| serviceAccount.labels | object | {} | ServiceAccount labels. |
| serviceAccount.annotations | object | {} | Annotations to add to the service account |
| serviceAccount.name | string | "" | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| podSecurityContext | object | {} | |
| privileged | bool | true | If set to false, deploys an unprivileged / less privileged setup. |
| contextPropagation | object | {"enabled":true} | Enables context propagation support. |
| extraCapabilities | list | [] | Extra capabilities for unprivileged / less privileged setup. |
| securityContext | object | {"privileged":true} | Security context for privileged setup. |
| priorityClassName | string | "" | Priority class name for the pods |
| service.enabled | bool | false | whether to create a service for metrics |
| service.type | string | "ClusterIP" | type of the service |
| service.annotations | object | {} | Annotations for the agent Service and defaults for the cache Service. |
| service.labels | object | {} | Service labels. |
| service.clusterIP | string | "" | cluster IP |
| service.loadBalancerIP | string | "" | loadbalancer IP |
| service.loadBalancerClass | string | "" | loadbalancer class name |
| service.loadBalancerSourceRanges | list | [] | source ranges for loadbalancer |
| service.port | int | 80 | Prometheus metrics service port |
| service.targetPort | string | "" | targetPort overrides the Prometheus metrics port derived from the OBI configuration. This value can be either integer or string. |
| service.portName | string | "metrics" | name of the port for Prometheus metrics. |
| service.appProtocol | string | "" | Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp" |
| service.nodePort | int | nil | NodePort for the service when type is NodePort. Requires service.type: NodePort |
| service.externalIPs | list | [] | External IPs to assign to the service |
| service.externalTrafficPolicy | string | "" | External traffic policy (Local or Cluster) |
| service.internalMetrics.port | int | 8080 | internal metrics service port |
| service.internalMetrics.targetPort | string | "" | targetPort overrides the internal metrics port derived from the OBI configuration. This value can be either integer or string. |
| service.internalMetrics.portName | string | "int-metrics" | name of the port for internal metrics. |
| service.internalMetrics.appProtocol | string | "" | Adds the appProtocol field to the service. This allows to work with istio protocol selection. Ex: "http" or "tcp" |
| service.internalMetrics.nodePort | int | nil | NodePort for internal metrics when type is NodePort. Requires service.type: NodePort |
| resources | object | {} | |
| updateStrategy.type | string | "RollingUpdate" | update strategy type |
| volumes | list | [] | Additional volumes on the output daemonset definition. |
| volumeMounts | list | [] | Additional volumeMounts on the output daemonset definition. |
| nodeSelector | object | {} | The nodeSelector field allows user to constrain which nodes your DaemonSet pods are scheduled to based on labels on the node |
| tolerations | list | [] | Tolerations allow pods to be scheduled on nodes with specific taints |
| affinity | object | {} | used for scheduling of pods based on affinity rules |
| podAnnotations | object | {} | Adds custom annotations to the Opentelemetry eBPF Instrumentation Pods. |
| podLabels | object | {} | Adds custom labels to the Opentelemetry eBPF Instrumentation Pods. |
| dnsPolicy | string | "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.skipConfigMapCheck | bool | false | set to true, to skip the check around the ConfigMap creation |
| config.create | bool | true | set to true to create a ConfigMap from the effective OBI configuration |
| config.name | string | "" | |
| config.data | object | {} | 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 }}}}. |
| env | object | {} | Extra environment variables available to the OBI configuration. |
| envValueFrom | object | {} | extra environment variables to be set from resources such as k8s configMaps/secrets |
| preset | string | "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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartopentelemetry-ebpf-instrumentation is pinned at v0.16.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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