How do I sign-in to kubernetes dashboard?

0 votes

I'm running kubeadm and kubelet v1.8.0 and have installed the dashboard following the official docs.

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

I started the dashboard using:

$ kubectl proxy --address="192.168.0.101" -p 8001 --accept-hosts='^*$'

And it successfully started on: http://192.168.0.101:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

I was redirected here:

enter image description here

So now, I don't how to login from here on. I tried to upload the /etc/kubernetes/admin.conf as kubeconfig but failed. I don't know how to use the token option. How do I sign in here?

Sep 7, 2018 in Kubernetes by shubham
• 6,910 points
802 views

I believe your kuberntes-dashboard version is under v1.10.0, because start from v1.11.0, dashboard due to security removed  the feature called "skip" on the login console. 

I missed the "skip" it is so easy.. just click it and you can access every thing.

1 answer to this question.

0 votes

Since version 1.7 Dashboard uses more secure setup. It means, that by default it has minimal set of privileges and can only be accessed over HTTPS. It is recommended to read Access Control guide before performing any further steps.

As of release 1.7 Dashboard supports user authentication based on:

--- Dashboard on Github

As for logging with Token. You'll have to create a service account for the dashboard and use it's credentials. Run these commands:

1. This command will create a service account for dashboard in the default namespace

$ kubectl create serviceaccount dashboard -n default

2. This command will add the cluster binding rules to your dashboard account

$ kubectl create clusterrolebinding dashboard-admin -n default \
  --clusterrole=cluster-admin \
  --serviceaccount=default:dashboard

3. This command will give you the token required for your dashboard login

$ kubectl get secret $(kubectl get serviceaccount dashboard -o jsonpath="{.secrets[0].name}") -o jsonpath="{.data.token}" | base64 --decode

Now copy the token and paste it in the token field on your dashboard login page.

answered Sep 7, 2018 by DareDev
• 6,870 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

Whenever I open Kubernetes dashboard , it ask for token. How to fix it ?

This article will help you. https://www.google.co.in/amp/s/www.edureka.co/blog/install-kubernetes-on-ubuntu/amp/ You have to ...READ MORE

answered Sep 21 in Kubernetes by Jai
47 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,970 points

reshown Apr 12, 2019 by Kalgi 2,772 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
9,128 views
0 votes
1 answer
0 votes
2 answers

How to rename deployments in Kubernetes

Hey, You can edit or recreate it ...READ MORE

answered Dec 5, 2018 in Kubernetes by Maverick
• 10,820 points
3,169 views