Last active
October 12, 2018 17:37
-
-
Save sdorsett/8b98ea0a51e7eed69eea857fd953224c to your computer and use it in GitHub Desktop.
bash script for determining the kubernetes dashboard URL
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 | |
PORTAL_PORT=$(kubectl describe service kubernetes-dashboard --namespace=kube-system| grep -i 'NodePort:' | awk {' print $3 '} | awk -F \/ {' print $1 '}) | |
PORTAL_NODE=$(kubectl get pods --namespace=kube-system| grep -i dashboard | awk {' print $1 '}) | |
PORTAL_IP_ADDRESS=$(kubectl describe pod $PORTAL_NODE --namespace=kube-system| grep Node | grep '/' | awk -F \/ {' print $2 '}) | |
echo "kubernetes dashboard URL is the following: http://$PORTAL_IP_ADDRESS:$PORTAL_PORT/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment