Skip to content

Instantly share code, notes, and snippets.

@rberrelleza
Created April 20, 2020 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rberrelleza/38d81ee6ca335700f04c4a227ffc4868 to your computer and use it in GitHub Desktop.
Save rberrelleza/38d81ee6ca335700f04c4a227ffc4868 to your computer and use it in GitHub Desktop.
Force terminate a namespace stuck in the terminating phase
namespace=$1
kubectl get namespace $namespace -ojson | jq 'del(.spec.finalizers[0])' | kubectl replace --raw "/api/v1/namespaces/$namespace/finalize" -f=-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment