Skip to content

Instantly share code, notes, and snippets.

@umardx
Forked from hrittikhere/delete_namespace
Created October 3, 2021 13:41
Show Gist options
  • Save umardx/68563e15ff1b9db7942d47ee6709cd49 to your computer and use it in GitHub Desktop.
Save umardx/68563e15ff1b9db7942d47ee6709cd49 to your computer and use it in GitHub Desktop.
Delete Terminating Namespace
kubectl get namespace "terminating-namespace" -o json \
| tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" \
| kubectl replace --raw /api/v1/namespaces/terminating-namespace/finalize -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment