Skip to content

Instantly share code, notes, and snippets.

@oskapt
Last active September 25, 2019 10:55
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 oskapt/feae48cb2ac2e8a7ee936f9877100cd4 to your computer and use it in GitHub Desktop.
Save oskapt/feae48cb2ac2e8a7ee936f9877100cd4 to your computer and use it in GitHub Desktop.
Delete stuck containership K8s resources
kubectl get authorizationrolebinding.auth.containership.io \
| tail -n +2 | awk '{ print $1 }' | while read x; do
kubectl get -o yaml authorizationrolebinding.auth.containership.io/$x -o json | jq '.metadata.finalizers=[]' \
| kubectl apply -f -;
done
kubectl get authorizationrole.auth.containership.io \
| tail -n +2 | awk '{ print $1 }' | while read x; do
kubectl get -o yaml authorizationrole.auth.containership.io/$x -o json | jq '.metadata.finalizers=[]' \
| kubectl apply -f -;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment