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.
CautionAmazon 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.
- From the left navigation, click Data & integrations > Add Data.
- Click Linux.
- 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 updateDeploy 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=HelmRun 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 observeRun 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.
NoteWhen 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 /.
- OTLP/HTTP endpoint: http://observe-agent-forwarder.observe.svc.cluster.local:4318
- OTLP/grpc endpoint: http://observe-agent-forwarder.observe.svc.cluster.local:4317
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 observeFurther reading
See the following topics for additional things you can do after installing the Observe Agent in your Kubernetes environment:
- Helm Chart components
- Collect annotations and labels
- Add and delete attributes
- Prometheus autodiscovery
- Application RED metrics
- Filter logs and metrics
- Handle mutiline log records
- Mask sensitive data
- Collect StatsD metrics
- Collect StatsD metrics using UDS
- Node affinity, taints, and tolerations
- Deploy to multiple clusters using Rancher
- Deploy to a serverless Kubernetes cluster
- Tune service resource requests and limits
- Trace tail sampling
Updated 11 days ago
Use the Kubernetes Explorer to monitor your Kubernetes clusters. To analyze your trace data, explore both the Trace Explorer and the Service Explorer.