Codementor Events

Install Kubernetes Dashboard - Part III

Published May 24, 2018Last updated Jan 28, 2019
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/aio/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.

Gist

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.

Gist

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.

Originally published at iamchuka.com on May 22, 2018.

Discover and read more posts from Chuka Ofili
get started
post commentsBe the first to share your opinion
Show more replies