1. Architecture #
One operator, one resource.
Components #
| Mode | Principle | When |
|---|---|---|
| cloudNativeFullStack | OneAgent as a DaemonSet for the host + injection into pods via webhook | Recommended: full visibility |
| applicationMonitoring | Injection into pods only, without a host agent | Managed clusters without privileged access to nodes, or targeted monitoring |
| hostMonitoring | Node monitoring only | Infrastructure without application traces |
| classicFullStack | Legacy full DaemonSet mode | Existing setups, to be migrated |
2. Installing #
Helm and DynaKube.
Installation #
helm install dynatrace-operator oci://public.ecr.aws/dynatrace/dynatrace-operator \
--create-namespace --namespace dynatrace --atomic
kubectl -n dynatrace create secret generic dynakube \
--from-literal=apiToken="$DT_OPERATOR_TOKEN" --from-literal=dataIngestToken="$DT_INGEST_TOKEN"apiVersion: dynatrace.com/v1beta3
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
apiUrl: https://<environnement>.live.dynatrace.com/api
oneAgent:
cloudNativeFullStack: {}
activeGate:
capabilities: [kubernetes-monitoring, routing]
replicas: 2Good to know: The DynaKube API version (v1beta3,v1beta4...) depends on the Operator version: generate the manifest from Deploy Dynatrace > Kubernetes to start from an up-to-date example.
3. Troubleshooting #
The right reflexes.
Commands #
kubectl -n dynatrace get dynakube # état (Running, Error) et versions
kubectl -n dynatrace get pods
kubectl -n dynatrace exec deploy/dynatrace-operator -- dynatrace-operator troubleshoot
kubectl -n dynatrace exec deploy/dynatrace-operator -- dynatrace-operator support-archive --stdout > archive.zip| Symptom | Common cause |
|---|---|
| Pods not instrumented | Namespace excluded by namespaceSelector, pod started before the Operator (restart the pod) |
| DynaKube token error | Token missing the required permissions or expired |
| Nodes without OneAgent | Taints not tolerated: add tolerations in the DynaKube |
Good practice: Explicitly exclude system namespaces and those of other instrumentation tools: two injectors in the same pod produce duplicate traces or crashes at startup.
