Ubuntu 26.04

Kubernetes : Enable Dashboard2026/05/13

 

Enable Dashboard to manage Kubernetes Cluster on Web UI.

In this example, a Kubernetes cluster is configured using four nodes as follows.

+----------------------+   +----------------------+
|  [ ctrl.srv.world ]  |   |   [ dlp.srv.world ]  |
|     Manager Node     |   |     Control Plane    |
+-----------+----------+   +-----------+----------+
        eth0|10.0.0.25             eth0|10.0.0.30
            |                          |
------------+--------------------------+-----------
            |                          |
        eth0|10.0.0.51             eth0|10.0.0.52
+-----------+----------+   +-----------+----------+
| [ node01.srv.world ] |   | [ node02.srv.world ] |
|     Worker Node#1    |   |     Worker Node#2    |
+----------------------+   +----------------------+

[1]

Install Helm, refer to here.

[2] Install Headlamp Dashboard.
ubuntu@ctrl:~$
helm repo add headlamp https://kubernetes-sigs.github.io/headlamp/

"headlamp" has been added to your repositories
# create a namespace for dashboard

ubuntu@ctrl:~$
kubectl create namespace dashboard

namespace/dashboard created
ubuntu@ctrl:~$
helm install headlamp headlamp/headlamp -n dashboard

NAME: headlamp
LAST DEPLOYED: Wed May 13 00:27:02 2026
NAMESPACE: kube-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
1. Get the application URL by running these commands:
  export POD_NAME=$(kubectl get pods --namespace dashboard -l "app.kubernetes.io/name=headlamp,app.kubernetes.io/instance=headlamp" -o jsonpath="{.items[0].metadata.name}")
  export CONTAINER_PORT=$(kubectl get pod --namespace dashboard $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
  echo "Visit http://127.0.0.1:8080 to use your application"
  kubectl --namespace dashboard port-forward $POD_NAME 8080:$CONTAINER_PORT
2. Get the token using
  kubectl create token headlamp --namespace dashboard

ubuntu@ctrl:~$
kubectl get pods -n dashboard

NAME                        READY   STATUS    RESTARTS   AGE
headlamp-55f6747596-dzknq   1/1     Running   0          44s
[3] Obtain a security token for the dashboard and configure it to allow access to the dashboard.
# get security token of the headlamp account

ubuntu@ctrl:~$
kubectl create token headlamp -n dashboard

eyJhbGciOiJSUzI1NiIsI.....

# set port-forwarding to access to dashboard

ubuntu@ctrl:~$
kubectl port-forward -n dashboard service/headlamp --address 0.0.0.0 8443:80

Forwarding from 0.0.0.0:8443 -> 8443
[4]

Access to the URL below on a client computer in your local network.

⇒ http://(Manager Node Hostname or IP address):(setting port)/

After displaying following form, Copy and paste the security token you got on [3] to [Enter token] section and Click [Sing In] button.
[5] After authentication successfully passed, Kubernetes Cluster Dashboard is displayed.
Matched Content