Install Kubernetes Dashboard on Kind Cluster

Hardik PatelHardik Patel
2 min read

Kind itself does not come with a built-in Kubernetes dashboard, but you can manually install the Kubernetes Dashboard on a Kind cluster. Here’s how:


1. Deploy the Kubernetes Dashboard

Run the following command to install the official Kubernetes Dashboard:

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

2. Create an Admin User for Access

Since the dashboard requires authentication, create a ServiceAccount and a ClusterRoleBinding.

Create a file dashboard-admin.yaml:

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

Apply it:

kubectl apply -f dashboard-admin.yaml

3. Get the Authentication Token

Run the following command to get the login token:

kubectl -n kubernetes-dashboard create token admin-user

Copy the token—this will be used to log in to the dashboard.


4. Expose the Dashboard

Since Kind does not provide a LoadBalancer by default, you need to use kubectl proxy:

kubectl proxy

The dashboard will now be accessible at:

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

5. Access the Dashboard

  1. Open the dashboard URL in your browser.

  2. Select Token authentication.

  3. Paste the copied token from Step 3.

  4. Click Sign In.


Alternative: Expose Dashboard Using NodePort

If you prefer, you can expose the dashboard using a NodePort:

kubectl -n kubernetes-dashboard edit service kubernetes-dashboard

Find this line:

type: ClusterIP

Change it to:

type: NodePort

Then, get the node port:

kubectl -n kubernetes-dashboard get svc

Get the kind Node IP

kubectl get nodes -o wide

Access the dashboard at:

https://<KIND_NODE_IP>:<NODEPORT>

Conclusion

Kind does not have a built-in dashboard, but you can manually install and access it using kubectl proxy or a NodePort. Let me know if you need help setting up! 🚀

0
Subscribe to my newsletter

Read articles from Hardik Patel directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Hardik Patel
Hardik Patel

I am Tech enthusiastic from India. Learning and sharing about DevOps journey.