Dynatrace Operator version 1.0.0+
This guide describes the steps required to migrate your Dynatrace deployment from classic full stack to the cloud native full stack mode.
The cloud native full stack deployment mode represents a major advancement in security, utilizing cloud native methods for OneAgent injection. This approach addresses two key limitations found in the traditional full stack mode:
This section provides all the information needed to migrate from classic to cloud native full stack mode.
The standard migration procedure described below requires OneAgent version 1.281 or higher for Kubernetes clusters using CRI-O as their container runtime, so you need to upgrade OneAgents accordingly before continuing with the steps below.
If that upgrade cannot be performed, follow the Running CRI-O with OneAgent versions 1.279 or earlier procedure for an alternative migration flow, and then return to step 1 of this procedure.
Add CSI Driver to existing installation:
Reconfigure (existing) DynaKube for cloud native full stack mode:
The following side-by-side comparison outlines how to reconfigure a DynaKube CR from classic full stack to cloud native full stack monitoring:
For further information on how to configure DynaKube for cloud native full stack mode, see the comparison below, visit the deployment guide or DynaKube parameters. Alternatively, download the DynaKube custom resource sample for cloud native full stack 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 classic full stack mode and subsequently result in the termination of deep monitoring for application pods shortly thereafter.
Wait for OneAgents to become ready:
The Dynatrace Operator will pick up the changes in the DynaKube custom resource and ensure new OneAgents are available on each node.
Restart application workloads:
Restart all application workloads promptly to trigger OneAgent injection and enable deep monitoring preventing/minimizing monitoring outages.
This section outlines the migration procedure for Kubernetes clusters utilizing a CRI-O container runtime and running OneAgent version 279 or earlier.
It is necessary to remove CRI-O hooks installed and utilized for OneAgent injection in classic full-stack mode. For additional details on CRI-O hooks, refer to this Red Hat blog post.
Follow these instructions to successfully migrate from classic full-stack mode:
Delete DynaKube custom resource:
Delete the DynaKube configured in classic full-stack mode by running the following command:
kubectl delete dynakube -n dynatrace <dynakube-name>
This action will lead to the removal of OneAgents in classic full-stack mode and subsequently result in the termination of deep monitoring for application pods shortly thereafter. Additionally, if Kubernetes monitoring is configured in the DynaKube custom resource, Kubernetes monitoring will stop instantly with the removal of the ActiveGate.
Wait for the OneAgent pods to terminate.
Run uninstall script:
Execute the uninstall.sh
script on each node previously monitored by OneAgent to remove mentioned CRI-O hooks:
/opt/dynatrace/oneagent/agent/uninstall.sh
Continue with step 1 of the standard migration procedure.
This migration impacts several Kubernetes resources, altering their functions or introducing new components to support cloud native injection mode. Key changes include:
Component
Classic full stack
Cloud native full stack
OneAgent
Dynatrace Webhook Server
required