Skip to content

Instantly share code, notes, and snippets.

@phnahes
Created October 22, 2020 19:22
Show Gist options
  • Save phnahes/7714f0536a814730a76b3a3c3d485cfb to your computer and use it in GitHub Desktop.
Save phnahes/7714f0536a814730a76b3a3c3d485cfb to your computer and use it in GitHub Desktop.
Remove Stucks PV/PVC from Kubernets

To remove Stucks PV/PVC from Kubernets

kubectl get pv | tail -n+2 | awk '{print $1}' | xargs -I{} kubectl patch pv {} --type='merge' -p '{"metadata":{"finalizers": null}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment