- Datadog Kubernetes UI overview
- Local k3d environment (k3s running in Docker)
- Datadog components in Kubernetes (Agent, Cluster Agent, Operator)
- Installing Datadog via Helm and creating the API key secret
- DatadogAgent CR example (operator-based install)
- Instrumenting a Node.js app with dd-trace
- Building the Docker image and deploying the app pod
- Generating traffic with k6 and viewing logs/traces in Datadog
Datadog Infrastructure → Kubernetes Overview
From the Datadog console (this demo uses the US5 site), the Infrastructure → Kubernetes Overview gives a concise, high-level view of connected clusters. Clicking a cluster updates dashboards to show counts for clusters, namespaces, nodes, deployments, pods, containers, ReplicaSets, and Services.



Local lab environment — k3d (k3s in Docker)
This demo uses k3d, a lightweight tool that runs k3s inside Docker. Each k3d node is a Docker container, sodocker ps (or k3d docker ps) shows Kubernetes nodes as containers.
Example k3d help summary:
docker ps output for a k3d cluster:
Datadog components in Kubernetes
Common Datadog components deployed in Kubernetes (installed via Helm or Operator):
Verify daemonsets and deployments:
Installing Datadog via Helm
Add the Datadog Helm repo and install the chart:API keys and Kubernetes secrets
Create an API key in the Datadog web UI (Organization Settings → API keys). Store the key in a Kubernetes secret for the Agent to use:<DATADOG_API_KEY> with the key you copied from Datadog.
Verify the secret exists:


DatadogAgent (Operator) example
When using the Datadog Operator, the DatadogAgent CR references the secret with the API key. ExampleDatadogAgent manifest:
clusterName— how the cluster will appear in Datadog.site— Datadog site/region (e.g.,us5.datadoghq.com).credentials.secret— Kubernetes secret name/key that contains the API key.features— enableorchestratorExplorer,logCollection,apm, and profiling.
kubectl logs on the Agent pods to diagnose authentication errors.
Ensure the secret name and key in the DatadogAgent manifest match the actual Kubernetes secret. Missing or incorrect API key references will prevent the Agent from sending telemetry.
Application instrumentation (Node.js)
This demo uses a simple Node.js REST API with three routes. To enable Datadog tracing for Node.js, installdd-trace and initialize it as early as possible — before other imports or application initialization.
Always require and initialize
dd-trace at the top of your application entrypoint (before requiring frameworks like express) so auto-instrumentation captures requests and internal spans.index.js (tracing + basic routes):
Dockerfile
Make suredd-trace is installed in the image so the tracer import resolves at runtime.
Pod manifest (example)
The application pod example includes environment variables used by the Datadog tracer/agent and references thedatadog-secret for the API key.
Traffic generation with k6
Use a lightweight k6 script to exercise the Node.js routes and quickly create traces and logs.load.js:
Logs and traces in Datadog
The Datadog Agent forwards logs and receives traces (APM) on port 8126. After generating traffic, you can inspect application logs and traces in Datadog. Logs Explorer (filter by service, host, or container) shows timestamp, host, service, content, and extracted severity levels (info/warn/error).
node-app service or to a specific host/container.

route1 in the Node.js app.


Wrap up — What you accomplished
This lesson demonstrated how to:- Deploy and validate Datadog components (Agent, Cluster Agent, Operator) in Kubernetes and verify daemonsets/pods.
- Create a Kubernetes secret for the Datadog API key and reference it in the DatadogAgent configuration.
- Instrument a Node.js application with
dd-trace(initialize at the top of the entrypoint) and include the tracer in the Docker image. - Configure the application pod with environment variables so the Agent can collect traces, logs, and profiles.
- Generate traffic with k6 and observe logs/traces inside Datadog.

- Datadog Docs — APM & Tracing: https://docs.datadoghq.com/tracing/
- Datadog Helm Chart: https://helm.datadoghq.com
- Kubernetes Basics: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
- k3d: https://k3d.io/