Last active
August 29, 2015 14:27
-
-
Save vreon/df4156e38c92d3457b01 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# k8s-status.sh: get a birds-eye view of a Kubernetes cluster | |
# For best results: watch -cn1 ./k8s-status.sh | |
green='\e[0;32m' | |
yellow='\e[0;33m' | |
purple='\e[0;35m' | |
cyan='\e[0;36m' | |
white='\e[0;37m' | |
reset='\e[0m' | |
section() { | |
echo -ne $3 | |
echo "===== $2 =====" | |
kubectl get ${@:4} $1 | |
echo -e $reset | |
} | |
section po 'PODS' $cyan $@ | |
section rc 'REPLICATION CONTROLLERS' $purple $@ | |
section svc 'SERVICES' $yellow $@ | |
section ep 'ENDPOINTS' $green $@ | |
section no 'NODES' $white $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment