Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.34 KB

K8s-Enable-Dashboard-On-Cluster.md

File metadata and controls

59 lines (39 loc) · 2.34 KB

LAB: Enable Dashboard on Cluster

K8s Cluster (with Multipass VM)

Enable Dashboard on Cluster

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/aio/deploy/recommended/kubernetes-dashboard.yaml
Kubectl proxy
on browser: http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

image

  • Now we should find to token to enter dashboard as admin user.
kubectl create serviceaccount dashboard-admin-sa
kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa
kubectl get secrets
kubectl describe secret dashboard-admin-sa-token-m84l5             # token name change, pls find it using "kubectl get secrets"

image

image

image

  • Enter Token that is grabbed before:

image

  • Now we reached the dashboard:

image

Enable Dashboard on Minikube

  • Minikube has addons to enable dashboard:
minikube addons enable dashboard
minikube addons enable metrics-server
minikube dashboard
# if running on WSL/WSL2 to open browser
sensible-browser http://127.0.0.1:45771/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/

image

Reference