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,590 points
87 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.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,710 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,120 points
202 views
0 votes
1 answer

How do I create a service account for my dashboard and get all the credentails

Run the following commands: This command will create ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 36,420 points
139 views
+3 votes
1 answer
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
749 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,020 points
192 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.