Running Kubernetes Dashboard On Docker-On-Mac

Suchit Gupta
2 min readMay 4, 2020

--

A step by step guide for running the Kubernetes dashboard on Docker on Mac

Prerequisite:

  1. Docker on Mac should be installed.
  2. Kubernetes should be enabled.
A running Kubernetes on Docker on Mac

Steps to run the Kubernetes Dashboard:

Step1: To deploy Dashboard, execute the following command:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
Command o/p

Step 2: Execute the following command to create a service account for accessing the dashboard:

kubectl create serviceaccount dashboard-admin-sa
Command o/p

Step 3: Following command will give the required permission to the user:

kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa --namespace=default
Command o/p

Step 4: Get the secret with which we need to login to the dashboard

kubectl get secrets
Command o/p
kubectl describe secret dashboard-admin-sa-token-znm4x

Note: look for secret with prefix dashboard-admin-sa-token

Command o/p

Step 5: Now open the terminal and execute:

kubectl proxy
command o/p

Whoa! you are all set!

Access link:

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

Kubernetes Login Page

Enter your secret that we fetched on Step 4.2

Kubernetes Dashboard

--

--

Responses (2)