Skip to content

Instantly share code, notes, and snippets.

@sckn
Created January 28, 2021 12:56
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 sckn/8b52a486cb467f71b519d7de376b4d11 to your computer and use it in GitHub Desktop.
Save sckn/8b52a486cb467f71b519d7de376b4d11 to your computer and use it in GitHub Desktop.
kubectl get ns | grep Terminating|cut -d " " -f 1|while read NSNAME; do echo $NSNAME;kubectl get namespace $NSNAME -o json|jq ".spec.finalizers = []"|kubectl replace --raw "/api/v1/namespaces/$NSNAME/finalize" -f -;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment