Created
September 25, 2017 09:56
-
-
Save mclarke47/fcfee1b3bed906cb3afae2022eca7224 to your computer and use it in GitHub Desktop.
Kubernetes effective restart with delay by app label
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 | |
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