Migrate from cloud native full stack to application monitoring mode
Dynatrace Operator version 1.0.0+
This guide describes the steps required to migrate your Dynatrace deployment from cloud native full stack to the application monitoring mode.
Advantages
To only monitor selected applications on Kubernetes, application monitoring offers a flexible approach with the following benefits:
The application monitoring mode, similar to the cloud native full stack mode, prevents race conditions that can occur when OneAgent DaemonSet pods and monitored application pods start simultaneously.
By leveraging Kubernetes concepts such as admission webhooks and CSI driver for Code Module injection, application monitoring mode reduces the required privileges for OneAgent.
Considerations and implications
When switching to application monitoring, previously deployed OneAgents will get deactivated and deep monitoring of applications will stop. Consequently, restarting all application pods that require deep monitoring becomes mandatory. Restarting these pods ensures that applications are reinjected, allowing deep monitoring to resume.
In application monitoring mode, container monitoring rules are ignored. Instead, label selectors should be employed to precisely manage OneAgent injection.
For further information on how to configure DynaKube for application monitoring mode, visit the deployment guide or DynaKube parameters. Alternatively, download the DynaKube custom resource sample for application monitoring from GitHub and adapt the DynaKube custom resource according to your requirements.
Apply the DynaKube custom resource:
Run the command below to apply the DynaKube custom resource. A validation webhook will provide helpful error messages if there's a problem.
kubectl apply -f dynakube.yaml
This action will lead to the removal of OneAgents in cloud native full stack mode and subsequently result in the termination of deep monitoring for application pods shortly thereafter.
Restart application workloads:
Restart all application workloads promptly to trigger OneAgent injection and enable deep monitoring minimizing monitoring outages.
Changes in Kubernetes resources
The migration impacts several Kubernetes resources, altering their functions or introducing new components to support the application monitoring monitoring mode. Key changes include:
Component
Cloud native full stack
Application monitoring
Dynatrace OneAgent
Deployed as a DaemonSet
Collect host metrics on nodes
Not present
Dynatrace Webhook Server
Validates DynaKube definitions
Inject code modules into application pods by modifying pod definitions
Validates DynaKube definitions
Inject code modules into application pods by modifying pod definitions