Menu

Kubernetes OpenTelemetry Operator

When you deploy your application in Kubernetes, you can use the OpenTelemetry Operator to:

  1. Simplify how you deploy and manage OpenTelemetry components in Kubernetes.
  2. Inject OpenTelemetry instrumentation into Kubernetes workloads and send data to an OTLP endpoint.

Set up

Follow the OpenTelemetry Operator documentation to set up the OpenTelemetry Operator in your Kubernetes cluster.

Kubernetes Monitoring

We recommend starting with Kubernetes (Alloy) to monitor your Kubernetes cluster.

Skip the optional step to install the OpenTelemetry Collector and use the OTLP endpoint provided by the Kubernetes Alloy configuration.

Grafana OpenTelemetry SDK distributions

You can use custom Docker images of Grafana OpenTelemetry SDK distributions to instrument applications with the OpenTelemetry Operator.

The OpenTelemetry Operator documentation lists all upstream and community-supported languages.

Java example

The following example shows how to use the Grafana Labs distribution of the OpenTelemetry SDK for Java (JVM) with the OpenTelemetry Operator.

Follow the OpenTelemetry Operator Java documentation and add the following to the Kubernetes Instrumentation manifest to use the Grafana Java SDK:

yaml
spec:
  java:
    image: us-docker.pkg.dev/grafanalabs-global/docker-grafana-opentelemetry-java-prod/grafana-opentelemetry-java:2.3.0-beta.1
  exporter:
    ..

If you use the OpenTelemetry Operator Helm chart, set the image using Helm instead of manually editing the Instrumentation manifest.

shell
helm upgrade opentelemetry-operator open-telemetry/opentelemetry-operator --set manager.autoInstrumentationImage.java.repository=us-docker.pkg.dev/grafanalabs-global/docker-grafana-opentelemetry-java-prod/grafana-opentelemetry-java,manager.autoInstrumentationImage.java.tag=2.3.0-beta.1

Note

The docker tag 2.3.0-beta.1 matches the version on the release page with the v prefix removed.