Quickstart for Kubernetes on self-managed deployments
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability 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 can run in OpenTelemetry mode to retrieve traces, metrics, and logs from your infrastructure and applications, and forward them to Elastic Observability. Availability 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.
Serverless Observability
Generally available
Stack
Generally available
Elastic Agent
Generally available
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.
- Open Elastic Observability.
- Go to Add data.
- Select what you want to monitor.
- 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.
-
Add the OpenTelemetry repository to Helm
Shell helm repo add open-telemetry 'https://open-telemetry.github.io/opentelemetry-helm-charts' --force-update -
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>' -
Install the operator
Install the OpenTelemetry Operator using the
kube-stackHelm chart with the pre-configuredvalues.yamlfile.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.
-
Auto-instrument applications
Add a language-specific annotation to your namespace by replacing
<LANGUAGE>with one of the supported values (nodejs,java,python,dotnetorgo) 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.
-
Install the content packs
Install the Kubernetes OpenTelemetry Assets and System OpenTelemetry Assets integrations in Kibana.
-
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.