To use Kubernetes dashboard locally, follow the steps below:
-
Install the Kubernetes dashboard:
% kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
-
Create a secure channel to your Kubernetes cluster:
% kubectl proxy
-
Now access Dashboard at:
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
To login into the dashboard, you need to retrieve the bearer token. Follow the steps below:
-
Check existing secrets in
kube-system
namespace:% kubectl -n kube-system get secret
-
Now dig into the secret named
replicaset-controller-token-
xxx :% kubectl -n kube-system describe secrets replicaset-controller-token-kzpmc
-
Use the token above to login into the Kubernetes dashboard.