cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace Pods Still Running After Namespace Deletion? Here’s What You Need to Know

theharithsa
Dynatrace Champion
Dynatrace Champion

We've seen multiple customers face issues where Dynatrace Operator pods continue to run even after the dynatrace namespace has been deleted, especially in Google Cloud (GCP) Kubernetes clusters.

This typically happens because Dynatrace installs several cluster-scoped resources (like CRDs, webhook configurations, ClusterRoles, etc.) that are not automatically removed when a namespace is deleted. As a result, leftover components like validating webhooks and CRDs can continue to function and even interfere with new workloads — causing webhook errors or orphaned pods.


To ensure a complete and clean uninstallation of the Dynatrace Operator and all related components, here’s a checklist you can follow.

1. Confirm if Dynatrace was installed via Helm or manually via kubectl.

  • If installed via Helm:
    Run: 
helm uninstall dynatrace-operator -n dynatrace​


Wait for the uninstall to complete, then run: 

kubectl delete namespace dynatrace​

2. If manually installed or namespace already deleted:

Run the following to check for cluster-wide resources:

- kubectl get crd | grep dynatrace
- kubectl get clusterrole | grep dynatrace
- kubectl get clusterrolebinding | grep dynatrace
- kubectl get mutatingwebhookconfigurations | grep dynatrace
- kubectl get validatingwebhookconfigurations | grep dynatrace


Delete residual Dynatrace resources using:

- kubectl delete crd dynakubes.dynatrace.com
- kubectl delete clusterrole dynatrace-operator
- kubectl delete clusterrolebinding dynatrace-operator
- kubectl delete mutatingwebhookconfiguration dynatrace-operator
- kubectl delete validatingwebhookconfiguration dynatrace-operator


Check for any Dynatrace-related pods still running (outside namespace):

- kubectl get pods --all-namespaces | grep dynatrace


3. If Webhook errors persist during pod creation:
- Ensure webhook configurations are fully deleted.

4. Optional: Reboot GKE nodes if operator pods are stuck in Terminating.

Love more, hate less; Technology for all, together we grow.
1 REPLY 1

radek_jasinski
DynaMight Guru
DynaMight Guru

Very useful solution 🙂 Thank you!

Have a nice day!

Featured Posts