Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Follow publication

Member-only story

Kubernetes Dashboard

DaeGon Kim
Dev Genius
Published in
3 min readOct 30, 2024

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.

Kubernetes dashboard helm notes

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

Kubernetes dashboard login page

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…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Write a response

That’s a great guide on installing Kubernetes Dashboard using Helm! The web-based UI makes cluster management much more intuitive, especially for monitoring workloads and managing resources efficiently. If you're looking for a more streamlined way…

--