Skip to content

Instantly share code, notes, and snippets.

@toschneck
Created October 2, 2022 13:58
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 toschneck/837d061700338da6243c27e73cb341fa to your computer and use it in GitHub Desktop.
Save toschneck/837d061700338da6243c27e73cb341fa to your computer and use it in GitHub Desktop.
delete kuberenetes finalizer of all crds of group kubermatic
#!/usr/bin/env bash
for i in $(kubectl get crd | grep kubermatic.k8s.io | awk '{print $1}');
do
for j in $(kubectl get $i | awk '{print $1}'); do
kubectl patch $i $j --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment