How to install k8s dashboard using a node port

At this point you have already followed my guide to install k8s on VMware Photon

Login to your k8s-server

Now, install the dashboard using a modified yaml file I created for you

Now let’s add an admin user with the following command

Now let’s add that admin user to a role so they can access the dashboard

Now let’s see what node port the dashboard is located at

kubectl get service -n kubernetes-dashboard
Now open a browser to https://yourk8s-server:nodeport

For example, mine is https://192.168.86.46:30268

NOTE: Your browser settings may not allow you to access the site because it uses a self signed certificate. I used Chrome and when I got the warning screen I just typed thisisunsafe and press enter and it opened.

We need a token to access the Dashboard, let’s go back to the command line and run the following
SA_NAME="k8s-admin"

Now let’s print out the token with the following command and copy it to the clipboard

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep ${SA_NAME} | awk '{print $1}')

Now go back to the web browser and paste the token you just copied and click sign-in

Now you can manage your Kubernetes install from the Dashboard

Remember sharing is caring!

3 Replies to “How to install k8s dashboard using a node port”

  1. Pingback: Install Kubernetes on VMware Photon in 15 min. or less! | | VMtoCloud.com

  2. Your tutorials are killer! I was able to spin up a 2 node cluster, deploy the folding at home container and the dashboard in about 45 minutes, with zero knowledge of kubernetes and trying to learn along the way. This was a great help!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.