Created
September 14, 2017 00:26
-
-
Save chrislovecnm/134410c9c2b27c6723638953b6b03549 to your computer and use it in GitHub Desktop.
zsh alias' for kops
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
getMasterIP() | |
CLUSTER=$1 | |
AZ=$2 | |
aws ec2 describe-instances --filter Name="tag-value",Values="master-${AZ}.masters.${CLUSTER}" --filter Name="instance-state-name",Values="running" | jq -r '.Reservations[0].Instances[0].PublicIpAddress' | |
} | |
tailMasterLog() { | |
IP=$(getMasterIP $1 $2) | |
ssh admin@$IP "tail -f /var/log/daemon.log" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment