export NS=stucked-namespace
kubectl get namespace $NS -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/$NS/finalize -f -
Last active
January 15, 2020 22:18
-
-
Save darth-veitcher/613dd4556cd34dd8d5425f093a4765c0 to your computer and use it in GitHub Desktop.
Kubernetes Force Delete a Terminating Namespace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment