Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
In DevOps Last updated: November 11, 2022
Share on:
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

A better way to manage Kubernetes resources.

What is the Kubernetes Dashboard?

Kubernetes Dashboard is a web-based user interface to visualize the Kubernetes cluster. It shows you the details of the Kubernetes cluster, which includes the nodes in the cluster, namespaces, volumes, cluster roles, job details, and much more. You can deploy a containerized application through the Kubernetes dashboard with just a few clicks and manage all the cluster resources with ease.


You must have a running Kubernetes cluster before setting up a Kubernetes dashboard. Read this article to learn how to set up Kubernetes.

Deploy Kubernetes Dashboard

Run below kubectl command on the master node to deploy the Kubernetes dashboard.

geekflare@kubernetes-master:~$ sudo kubectl apply -f
namespace/kubernetes-dashboard created
serviceaccount/kubernetes-dashboard created
service/kubernetes-dashboard created
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-csrf created
secret/kubernetes-dashboard-key-holder created
configmap/kubernetes-dashboard-settings created created created created created
deployment.apps/kubernetes-dashboard created
service/dashboard-metrics-scraper created
deployment.apps/dashboard-metrics-scraper created

You can see dashboard pods are in running state now.

geekflare@kubernetes-master:~$ kubectl get pods --all-namespaces
kube-system coredns-6955765f44-hwxdq 1/1 Running 0 6m35s
kube-system coredns-6955765f44-z2tdg 1/1 Running 0 6m35s
kube-system etcd-kubernetes-master 1/1 Running 0 6m45s
kube-system kube-apiserver-kubernetes-master 1/1 Running 0 6m45s
kube-system kube-controller-manager-kubernetes-master 1/1 Running 0 6m45s
kube-system kube-proxy-4b5jz 1/1 Running 0 6m35s
kube-system kube-proxy-v26wn 1/1 Running 0 26s
kube-system kube-scheduler-kubernetes-master 1/1 Running 0 6m45s
kubernetes-dashboard dashboard-metrics-scraper-76585494d8-czrtf 1/1 Running 0 2m37s
kubernetes-dashboard kubernetes-dashboard-5996555fd8-5mhxm 1/1 Running 0 2m37s

Access Kubernetes Dashboard

Run the below command to access Kubernetes dashboard at (change this to your IP)

geekflare@kubernetes-master:~$ kubectl proxy --port=8001 --address='' --accept-hosts="^*$"
Starting to serve on

Open the browser and go to the link below to login to the Kubernetes dashboard.

These are the two ways to login to Kubernetes Dashboard.

  • Token
  • kubeconfig

Generate Token to log in

  • In the default namespace, create a service account.
geekflare@kubernetes-master:~$ kubectl create serviceaccount geekflare -n default
serviceaccount/geekflare created
  • Create cluster binding rules for the newly created service account.
geekflare@kubernetes-master:~$ kubectl create clusterrolebinding geekflare-admin -n default --clusterrole=cluster-admin --serviceaccount=default:geekflare created
  • Run the kubectl command below to generate the token
geekflare@kubernetes-master:~$ kubectl get secret $(kubectl get serviceaccount geekflare -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

You can use the generated token (as shown above) to login to the dashboard.


The other way to login is by using the Kubernetes configuration file.

  • Select the option Kubeconfig and click on “Choose Kubeconfig file.”
  • Use the admin.conf, file present at $HOME/.kube/config/ path and login to the dashboard successfully
kubernetes dashboard kubeconfig

Dashboard Interface

This is how the dashboard interface will look like.

Kubernetes Dashboard

You see the details of the Nodes, Persistent Volumes, Namespaces, Cluster Roles running in the Kubernetes cluster.

Kubernetes Dashboard Nodes
Kubernetes Dashboard - Volume

Using the dashboard, you can write YAML code in the editor to add new resources to the cluster.

Kubernetes Dashboard - Create New Resource

Once the cluster has multiple jobs running, you will get more visualization options. It will tell you which jobs failed or passed. If there is an issue with the cluster, you can see it in the dashboard easily.

  • Avi
    Avi is a tech enthusiast with expertise in trending technologies such as DevOps, Cloud Computing, Big Data and many more. He is passionate about learning cutting-edge technologies and sharing his knowledge with others through… read more
Thanks to our Sponsors
More great readings on DevOps
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.
    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder