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
• 7,340 points
2,326 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,890 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, 2020 in Kubernetes by Jai

edited Oct 6, 2021 by Sarfaraz 827 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
15,578 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,064 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 6, 2018 in Kubernetes by Maverick
• 10,840 points
10,155 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP