/ Kubernetes

Install Kubernetes Dashboard - Part III

This is the 3rd part in our $65 Kubernetes Cluster on DigitalOcean series, you can goto Part I to read on how to setup your cluster if you haven't done so yet.

There's also a video tutorial here for those who prefer to watch instead of read.

Introduction

The kubernetes dashboard is a graphical user interface tool that allows us to manage our cluster, monitor and troubleshoot our app deployments, as well as deploy new applications easily. It isn't installed by default if you installed your cluster manually (on managed services like Google Kubernetes Engine, it is preinstalled and configured for every new cluster).

Installing and setting it up is quite easy as per the docs here

TLDR.

Step 1 - Deploy Dashboard

Deploy the dashboard containers to your cluster.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Step 2 - Deploy Heapster, Grafana & InfluxDB

For our charts and graphs to show up in our dashboard, we'll need to deploy charting tools to enabled the kubernetes dashboard display them.

Save this yaml file as heapster-influxdb-grafana.yaml and run the command:

kubectl apply -f ./heapster-influxdb-grafana.yaml

Step 3 - Create Admin User

Create your admin user service account that we'll use to access our cluster.

Save this yaml file as k8s-admin-dashboard-user.yaml and run the command:

kubectl apply -f ./k8s-admin-dashboard-user.yaml

Step 4 - Get Service Account Token and Login

At this point our dashboard deployment should already by up, we'll need to get our access token and use that to login to the dashboard.

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

Now copy the token from the token part printed on-screen and paste it into Enter token field on log in screen.

Login Screen

Step 5 - Tea!

Sip some tea. We are done. :)

Conclusion

Next in our series, we'll install helm & automatic ssl certificates backed by letsencrypt. Stay tuned.

I hope this helps.

Chuka Ofili

Chuka Ofili

I’m a technology lover with a great passion for knowledge share. Nurturing & growing technical background/awareness in our ecosystem is a personal goal and hope to achieve one article at a time.

Read More
Install Kubernetes Dashboard - Part III
Share this

Subscribe to Chuka Ofili