Created
February 28, 2018 11:30
-
-
Save mclarke47/720de6e2b125ed77bfc25a913234c7e6 to your computer and use it in GitHub Desktop.
deletes pods with a delay
This file contains hidden or 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
#!/usr/bin/env bash | |
kubectl get po -l app=$1 -o=json | jq -r '.items[].metadata.name' | while read object; do | |
echo "rebooting $object" | |
kubectl delete po "$object" | |
sleep 180 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment