Member-only story
Kubernetes Dashboard
Version 7.9.0
In this article, we will install Kubernetes dashboard. The Kubernetes dashboard provides a web-based user interface. Its official website is here.
According to the official website, as of Oct 29, 2024, it supports only helm-based installation. Here, we will install it using helm. Then, we will create a service account to access the dashboard using kube-proxy. Finally, we will create a loadbalancer service for external access.
Installation
First, we need to add the kubernetes dashboard repo.
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm search repo kubernetes-dashboard # version 7.9.0
Now, we will install kubernetes dashboard without any user provided values.
helm upgrade --install kubernetes-dashboard \
kubernetes-dashboard/kubernetes-dashboard \
--create-namespace --namespace kubernetes-dashboard
The following notes will be printed.

So, we can run port-forward command and open a browser to access the dashboard.

Dashboard Access
To get a bearer token, we need to create a service account and assigned the appropriate roles. In this tutorial, we will assign the cluster-admin built-in role.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
Once these yaml specification is applied, we will have admin-user service account in the kubernetes-dashboard namespace. So, we are ready to generate a bearer token to access the dashboard.
kubectl -n kubernetes-dashboard create token admin-user
This command will generate a bearer token and we will use it to log into the…