Skip to content

Not able to completely remove Kubernetes CustomResource using kubectl delete crd – How to fix?

When you try to delete a crd using kubectl but it might hang for a long time without any response.

$ kubectl delete crd "" deleted

This is because Custom resources with finalizers can cause a “deadlock”. To fix this we need to patch the resource and remove the finalizers.

$ kubectl delete crd "" deleted

Now you can just go ahead and delete the crd.

See also  How to restart Kubernetes pods using kubectl?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.