Type to search.

Quickstart for Kubernetes on self-managed deployments

Serverless Observability

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Elastic Agent

Elastic Agent can run in OpenTelemetry mode to retrieve traces, metrics, and logs from your infrastructure and applications, and forward them to Elastic Observability.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Learn how to set up the Elastic Agent and EDOT SDKs in a Kubernetes environment to collect host metrics, logs and application traces.

The fastest way to get started is the Add data screen in Elastic Observability. It generates install commands with your endpoint and API key already included.

  1. Open Elastic Observability.
  2. Go to Add data.
  3. Select what you want to monitor.
  4. Follow the instructions.

To use the OpenTelemetry Kube Stack Chart, you need Helm version 3.9+ up to and including 4.3.0.

Follow these steps to deploy the Elastic Agent and EDOT SDKs in Docker.

  1. Add the OpenTelemetry repository to Helm

    Shell
    helm repo add open-telemetry 'https://open-telemetry.github.io/opentelemetry-helm-charts' --force-update
    
  2. Set up credentials

    Retrieve your Elasticsearch endpoint and API key and replace both in the following command to create a namespace and a secret with your credentials.

    Shell
    kubectl create namespace opentelemetry-operator-system
    kubectl create secret generic elastic-secret-otel \
    --namespace opentelemetry-operator-system \
    --from-literal=elastic_endpoint='<ELASTICSEARCH_ENDPOINT>' \
    --from-literal=elastic_api_key='<ELASTIC_API_KEY>'
    
  3. Install the operator

    Install the OpenTelemetry Operator using the kube-stack Helm chart with the pre-configured values.yaml file.

    Shell
    helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \
    --namespace opentelemetry-operator-system \
    --values 'https://raw.githubusercontent.com/elastic/elastic-agent/refs/tags/v9.5.6/deploy/helm/edot-collector/kube-stack/values.yaml' \
    --version '0.16.0'
    

    Elastic Agent can run in OpenTelemetry mode to retrieve traces, metrics, and logs from your infrastructure and applications, and forward them to Elastic Observability. Availability Generally available since 9.5 This functionality is generally available and ready for production usage. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. On OpenShift, add the OpenShift values file after the base values file. Refer to Deploy on OpenShift.

  4. Auto-instrument applications

    Add a language-specific annotation to your namespace by replacing <LANGUAGE> with one of the supported values (nodejs, java, python, dotnet or go) in the following command.

    Shell
    kubectl annotate namespace YOUR_NAMESPACE instrumentation.opentelemetry.io/inject-<LANGUAGE>="opentelemetry-operator-system/elastic-instrumentation"
    

    Restart your deployment to ensure the annotations and auto-instrumentations are applied.

    For languages where auto-instrumentation is not available, you will need to manually instrument your application. See the Setup section in the corresponding SDK.

  5. Install the content packs

    Install the Kubernetes OpenTelemetry Assets and System OpenTelemetry Assets integrations in Kibana.

  6. Explore your data

    Go to Kibana and select Dashboards to explore your newly collected data.

Having issues with Elastic OpenTelemetry? Refer to the Troubleshooting common issues with the Elastic Agent and Troubleshooting the EDOT SDKs for help.