Running Kubernetes Dashboard On Docker-On-Mac
2 min readMay 4, 2020
A step by step guide for running the Kubernetes dashboard on Docker on Mac
Prerequisite:
- Docker on Mac should be installed.
- Kubernetes should be enabled.
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
Step 2: Execute the following command to create a service account for accessing the dashboard:
kubectl create serviceaccount dashboard-admin-sa
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
Step 4: Get the secret with which we need to login to the dashboard
kubectl get secrets
kubectl describe secret dashboard-admin-sa-token-znm4x
Note: look for secret with prefix dashboard-admin-sa-token
Step 5: Now open the terminal and execute:
kubectl proxy
Whoa! you are all set!
Access link:
Enter your secret that we fetched on Step 4.2