Last active
August 1, 2017 00:59
-
-
Save hongymagic/bcd543018649e83e8de9e2d21176df7b to your computer and use it in GitHub Desktop.
Starting Kubernetes UI for current gcloud setup
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
kubeui () { | |
PROJECT=${1:-$(gcloud config list --format 'value(core.project)' 2>/dev/null)} | |
CLUSTER=${2:-$(gcloud config list --format 'value(container.cluster)' 2>/dev/null)} | |
ZONE=${3:-$(gcloud config list --format 'value(compute.zone)' 2>/dev/null)} | |
echo "==> Starting Kubernetes UI for cluster $PROJECT/$CLUSTER in $ZONE..." | |
gcloud container clusters get-credentials $CLUSTER --project $PROJECT --zone $ZONE && kubectl proxy --port=0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment