Skip to content

Instantly share code, notes, and snippets.

@hongymagic
Last active August 1, 2017 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hongymagic/bcd543018649e83e8de9e2d21176df7b to your computer and use it in GitHub Desktop.
Save hongymagic/bcd543018649e83e8de9e2d21176df7b to your computer and use it in GitHub Desktop.
Starting Kubernetes UI for current gcloud setup
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