Skip to content

Instantly share code, notes, and snippets.

View fabiorauber's full-sized avatar

Fabio Rauber fabiorauber

View GitHub Profile
@fabiorauber
fabiorauber / clearVolAttachs.sh
Last active March 25, 2022 13:13
Removes the finalizers from volumeattachments with a detachError
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