This guide describes the steps required to migrate your Dynatrace Operator deployment from CSI volumes to ephemeral volumes. Using the csidriver.migrationMode Helm value, you can complete this migration with a single pod-restart cycle instead of two, reducing disruption to your workloads.
When migration mode is active:
kubectl CLI access to the cluster.If you use codeModulesImage in your DynaKube, the Operator automatically switches to node image pull via ephemeral volume—no migration steps required. For the best update experience, enable public registry auto-update to let Dynatrace Operator resolve images automatically.
Upgrade Dynatrace Operator with csidriver.migrationMode enabled. This keeps the CSI DaemonSet running for unmounting while switching all new pod injections to ephemeral volumes.
helm upgrade dynatrace-operator oci://public.ecr.aws/dynatrace/dynatrace-operator \--namespace dynatrace \--reset-then-reuse-values \--set csidriver.enabled=true \--set csidriver.migrationMode=true \--atomic
After this upgrade, all newly injected pods use ephemeral-volume injection. Existing pods continue to use their current CSI mounts until they are restarted.
Perform a restart of all workloads that currently use CSI-based injection. This triggers the webhook to inject them with ephemeral volumes instead of CSI volumes.
Example how to restart deployments
kubectl rollout restart deployment <deployment-name> -n <namespace>
Make sure to restart all injected workloads.
Verify that no pods still use CSI-based Dynatrace volumes. Run the following command to check for remaining CSI volume mounts:
kubectl get pods --all-namespaces -o jsonpath='{range .items[?(@.spec.volumes[*].csi.driver=="csi.oneagent.dynatrace.com")]}{.metadata.namespace}{"\t"}{.metadata.name}{"\n"}{end}'
Empty output means all pods have been migrated. If any pods are listed, restart the workload.
Ensure all workloads have been successfully migrated to ephemeral volumes before disabling the CSI driver. Any pods that still rely on CSI mounts will fail to function after the CSI driver is disabled. Verify the results from the previous verification step before proceeding.
After you confirm that no CSI volumes remain, disable the CSI driver to remove the CSI DaemonSet and all related resources.
helm upgrade dynatrace-operator oci://public.ecr.aws/dynatrace/dynatrace-operator \--namespace dynatrace \--reset-then-reuse-values \--set csidriver.enabled=false \--atomic
This removes the CSI DaemonSet, ServiceAccount, RBAC resources, and the CSI driver object from your cluster.