RousselTMLEARNING

Observability

Dynatrace Operator on Kubernetes: DynaKube, monitoring modes and troubleshooting

Monitor Kubernetes with the Dynatrace Operator: Helm installation, the DynaKube resource, cloudNativeFullStack, applicationMonitoring and hostMonitoring modes, cluster ActiveGate, tokens and troubleshooting.

1. Architecture #

One operator, one resource.

Components #

Components deployed by the Dynatrace Operator
ModePrincipleWhen
cloudNativeFullStackOneAgent as a DaemonSet for the host + injection into pods via webhookRecommended: full visibility
applicationMonitoringInjection into pods only, without a host agentManaged clusters without privileged access to nodes, or targeted monitoring
hostMonitoringNode monitoring onlyInfrastructure without application traces
classicFullStackLegacy full DaemonSet modeExisting 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: 2
Good 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
SymptomCommon cause
Pods not instrumentedNamespace excluded by namespaceSelector, pod started before the Operator (restart the pod)
DynaKube token errorToken missing the required permissions or expired
Nodes without OneAgentTaints 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.

Related articles

Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)

Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over total): defi…

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three trade-offs, …

Accessing the Dynatrace playground and getting started

The Dynatrace playground is a demo environment full of real data: how to access it, what it allows and does n…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!