Created
June 27, 2017 13:49
-
-
Save mclarke47/ec3b158b202c8ebc359b2a3e687b49de to your computer and use it in GitHub Desktop.
reboot kube-aws etcd nodes
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
#!/usr/bin/env bash | |
aws ec2 describe-instances --filter "Name=tag-key,Values=kube-aws:role" "Name=tag-value,Values=etcd" | jq -r '.Reservations[].Instances[].InstanceId' | while read object; do | |
echo "rebooting $object" | |
aws ec2 reboot-instances --instance-ids ${object} | |
sleep 300 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment