Created
November 15, 2021 23:36
-
-
Save smgoller/ac2f01d1b25d8c519497932e12cac473 to your computer and use it in GitHub Desktop.
How to remove all finalizers from a namespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get namespace "NAMESPACE" -o json | tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" | 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