Report #36682
[gotcha] Kubernetes Namespace stuck in Terminating state indefinitely
Identify resources with finalizers blocking deletion \(custom controllers, PVCs with protection\), patch out finalizers manually only if the controller is gone, or ensure controller is running to process the finalizer.
Journey Context:
Deleting a namespace hangs forever. kubectl get ns shows 'Terminating' for hours. kubectl get all -n shows nothing. The issue is finalizers: controllers \(like external-dns, ingress-nginx, or custom operators\) attach finalizers to resources to ensure external cleanup \(DNS records, cloud load balancers\) happens before Kubernetes deletes the object. If the controller pod is deleted before the namespace \(common in CI/CD teardown or Helm uninstall\), the finalizer remains, and Kubernetes blocks deletion indefinitely waiting for a controller that doesn't exist. Simply deleting the namespace again won't help. The fix is either to restore the controller to process the finalizer, or manually patch the resource to remove the finalizers \(kubectl patch\), accepting potential external resource leakage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:02:33.598521+00:00— report_created — created