Install on Kubernetes

This page provides instructions for installing the Observe Agent in a Kubernetes environment to collect metrics, logs, and application telemetry—including OpenTelemetry traces—and forward them to Observe.

You may follow the instructions on this page to deploy the Observe Agent on Kubernetes, allowing you to gather raw events, logs, and metrics from Kubernetes.

🚧

Caution

Amazon EKS Auto Mode, Azure Kubernetes Service (AKS) Automatic, and GKE Autopilot are not supported yet.

Create an ingest token

Create an ingest token in the Add Data portal, and be sure to record this token in a safe place, as you will need to provide it during the installation.

  1. From the left navigation, click Data & integrations > Add Data.
  2. Click Linux.
  3. Click Create to generate a new ingest token.

Add the Observe Helm repository

Run the following commands to add the Observe Helm repository to your local Helm setup, allowing you to access and deploy Observe's charts.

helm repo add observe https://observeinc.github.io/helm-charts
helm repo update

Deploy the Observe Agent

Run the following commands to create a Kubernetes namespace called observe and generate a secret. Replace <YOUR_INGEST_TOKEN> with the ingest token you created earlier.

kubectl create namespace observe
  kubectl -n observe create secret generic agent-credentials --from-literal=OBSERVE_TOKEN=<YOUR_INGEST_TOKEN> 

kubectl annotate secret agent-credentials -n observe \
  meta.helm.sh/release-name=observe-agent \
  meta.helm.sh/release-namespace=observe

kubectl label secret agent-credentials -n observe \
  app.kubernetes.io/managed-by=Helm

Run the following command to deploy the Observe Agent in the observe namespace using observe-agent-monitored-cluster as the name for your Kubernetes cluster. Replace <YOUR_OBSERVE_COLLECTION_ENDPOINT> with your instance's collection endpoint (ex: https://123456789012.collect.observeinc.com/). For more information on configuring the agent, see values.yaml.

helm install observe-agent observe/agent -n observe \
--set observe.collectionEndpoint.value="<YOUR_OBSERVE_COLLECTION_ENDPOINT>" \
--set cluster.name="observe-agent-monitored-cluster" \
--set node.containers.logs.enabled="true" \
--set application.prometheusScrape.enabled="false" \
--set node.forwarder.enabled="true" \
--set node.forwarder.metrics.outputFormat="otel"

Run the following command to make sure the Observe Agent has been deployed successfully.

kubectl get pods -n observe

Run the following command to save the current configuration values to a file for future configuration adjustments and upgrades.

helm -n observe get values observe-agent -o yaml > observe-agent-values.yaml

Send application data to Observe

Once the Observe Agent is deployed, configure your application instrumentation or set the OTEL_EXPORTER_OTLP_ENDPOINT environment variable to one of the following addresses to send application telemetry including traces to the Observe Agent.

📘

Note

When setting up the endpoint to send traces, make sure you use the path that your OTLP library requires. Some libraries need traces to go to /v1/traces, while others expect them at the root path /.

For example, if you are using the OpenTelemetry Astronomy Shop Demo app, create the app.yaml.

default:
  envOverrides:
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: 'http://observe-agent-forwarder.observe.svc.cluster.local:4318'

Upgrade the helm chart for the OpenTelemetry Astronomy Shop Demo app.

helm upgrade --reuse-values -f app.yaml my-otel-demo open-telemetry/opentelemetry-demo

See APM instrumentation for more information about how to instrument your app for observability.

Uninstall the Observe Agent

You can uninstall the agent from your Kubernetes cluster.

helm uninstall observe-agent -n observe
kubectl -n observe delete secret agent-credentials
kubectl delete namespace observe

Further reading

See the following topics for additional things you can do after installing the Observe Agent in your Kubernetes environment:



What’s Next

Use the Kubernetes Explorer to monitor your Kubernetes clusters. To analyze your trace data, explore both the Trace Explorer and the Service Explorer.