The following guide describes how to setup the OpenTelemetry demo with Elastic Observability using Docker compose or Kubernetes.
- Start a free trial on Elastic Cloud and copy the
endpoint
andsecretToken
from the Elastic APM setup instructions in your Kibana. - Open the file
src/otelcollector/otelcol-config-extras.yml
in an editor and replace the following two placeholders:YOUR_APM_ENDPOINT_WITHOUT_HTTPS_PREFIX
: your Elastic APM endpoint (withouthttps://
prefix)YOUR_APM_SECRET_TOKEN
: your Elastic APM secret token.
- Start the demo with the following command from the repository's root directory:
docker-compose up -d
- Create a Kubernetes cluster. There are no specific requirements, so you can create a local one, or use a managed Kubernetes cluster, such as GKE, EKS, or AKS.
- Set up kubectl.
- Set up Helm.
- Setup Elastic Observability on Elastic Cloud.
- Create a secret in Kubernetes with the following command.
Don't forget to replace
kubectl create secret generic elastic-secret \ --from-literal=elastic_apm_endpoint='YOUR_APM_ENDPOINT_WITHOUT_HTTPS_PREFIX' \ --from-literal=elastic_apm_secret_token='YOUR_APM_SECRET_TOKEN'
YOUR_APM_ENDPOINT_WITHOUT_HTTPS_PREFIX
: your Elastic APM endpoint (withouthttps://
prefix)YOUR_APM_SECRET_TOKEN
: your Elastic APM secret token
- Execute the following commands to deploy the OpenTelemetry demo to your Kubernetes cluster:
# switch to the kubernetes/elastic-helm directory cd kubernetes/elastic-helm # add the open-telemetry Helm repostiroy helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts # deploy the demo through helm install helm install -f values.yaml my-otel-demo open-telemetry/opentelemetry-demo