Interview Prep/Kubernetes/Upgrades, etcd, disaster recovery and incidents

A namespace is stuck Terminating. What are the causes and the proper fix?

AdvancedScenarioUpgrades, etcd, disaster recovery and incidents
Answer

Situation read → kubectl delete ns app never finishes.

What I'd do →

  1. kubectl get ns app -o yaml and check status.conditions for what remains
  2. kubectl api-resources --verbs=list --namespaced -o name | xargs -n1 kubectl get -n app to find leftover objects
  3. Common blockers: finalizers on custom resources, unavailable aggregated API like metrics
  4. Fix the owner (operator or APIService)
  5. Only then remove finalizers

Why → Namespaces cannot finish deletion while any object or APIService still blocks.

Interview tip → Do not use the raw finalize API without checking.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Upgrades, etcd, disaster recovery and incidents