Skip to content

Instantly share code, notes, and snippets.

@karawitan
Created February 22, 2024 23:33
Show Gist options
  • Save karawitan/92591c61e75a55389f5a2326c94b5106 to your computer and use it in GitHub Desktop.
Save karawitan/92591c61e75a55389f5a2326c94b5106 to your computer and use it in GitHub Desktop.
kubectl delete finilizers
# when deletion of Kubernetes resource is getting stuck, solve it the bad way
kubectl patch configmap/mymap \
--type json \
--patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
#
kubectl patch ns/longhorn-system -p '{"metadata":{"finalizers":[]}}' --type=merge
# for a better option , read "Stop Messing with Kubernetes Finalizers" at https://martinheinz.dev/blog/74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment