Last active
March 25, 2022 13:13
-
-
Save fabiorauber/6d6d0603b8335b2511d0ebb38b7ae01e to your computer and use it in GitHub Desktop.
Removes the finalizers from volumeattachments with a detachError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get volumeattachments \ | |
-o=custom-columns='NAME:.metadata.name,UUID:.metadata.uid,NODE:.spec.nodeName,ERROR:.status.detachError' \ | |
--no-headers | grep -vE '<none>$' | awk '{print $1}' | \ | |
xargs -n1 kubectl patch -p '{"metadata":{"finalizers":[]}}' --type=merge volumeattachments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment