Created
October 8, 2023 12:27
-
-
Save rgpower/96e4ed3bc1b21264f3233310ff862803 to your computer and use it in GitHub Desktop.
delete all pod disruption budges
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
for pdb in $(kubectl get pdb --all-namespaces -o json | \ | |
jq -r '.items[] | select(.status.disruptionsAllowed<1) | [.metadata.namespace,.metadata.name] | join("/")'); \ | |
do kubectl -n "${pdb%%/*}" delete pdb/"${pdb##*/}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment