Dashboard is a web-based Kubernetes user interface. You can use Dashboard to deploy containerized applications to a Kubernetes cluster, troubleshoot your containerized application, and manage the cluster resources. You can use Dashboard to get an overview of applications running on your cluster, as well as for creating or modifying individual Kubernetes resources (such as Deployments, Jobs, DaemonSets, etc). For example, you can scale a Deployment, initiate a rolling update, restart a pod or deploy new applications using a deploy wizard.

Dashboard also provides information on the state of Kubernetes resources in your cluster and on any errors that may have occurred.

How to Deploy Kubernetes Dashboard?

Run the following command to deploy the dashboard:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

Accessing Dashboard using the kubectl:

kubectl proxy

It will proxy server between your machine and Kubernetes API server.

Now, to view the dashboard in the browser, navigate to the following address in the browser of your Master VM:

ui-dashboard - Kubernetes dashboard - Edureka

Create a Cluster Admin service account

In this step, we will create the service account for the dashboard and get its credentials.
Note: Run all these commands in a new terminal, otherwise your kubectl proxy command will stop. 

Run the following commands:

This command will create a service account for a dashboard in the default namespace:

kubectl create serviceaccount dashboard -n default

Add the cluster binding rules to your dashboard account:

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard

Copy the secret token required for your dashboard login using the below command:

kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

Copy the secret token and paste it in Dashboard Login Page, by selecting a token option.

After Sign In you will land to Kubernetes Homepage.

Home Page
You’ll see the home/welcome page in which you can view which system applications are running by default in the kube-system namespace of your cluster, for example, the Dashboard itself.