Skip to content

Instantly share code, notes, and snippets.

@ianhomer
Last active June 30, 2025 09:14
Show Gist options
  • Save ianhomer/fc2a69f041bf5dc8519896cbeadc9e79 to your computer and use it in GitHub Desktop.
Save ianhomer/fc2a69f041bf5dc8519896cbeadc9e79 to your computer and use it in GitHub Desktop.
Kubernetes namespace stuck in terminating. Remove finalizers from resources.
kubectl api-resources --verbs=list --namespaced -o name |
xargs -n 1 kubectl get --ignore-not-found -n my-namespace -o name |
xargs -n 1 kubectl patch -n my-namespace -p '{"metadata":{"finalizers":null}}' --type merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment