Dashboard version: 1.8.1
Kubernetes version: 1.9.0
Operating system: Ubuntu Ubuntu 16.04.3 LTS
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yamlkubectl -n kube-system get secretkubectl -n kube-system describe secret kubernetes-dashboard-token-lx6wfkubectl proxy --address='0.0.0.0' --port=8001 --accept-hosts='^*$' (only for test)http://myip:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/loginWhen i press "Sign in" nothing happens.
Browser console:

Duplicate of #2524 and possibly some others.
https://github.com/kubernetes/dashboard/wiki/Accessing-Dashboard---1.7.X-and-above
NOTE: Dashboard should not be exposed publicly using kubectl proxy command as it only allows HTTP connection. For domains other than localhost and 127.0.0.1 it will not be possible to sign in. Nothing will happen after clicking Sign in button on login page.
cool,thanks :)
Cool. I 'm the same issue. So that being said, how do I access the dashboard if not by kubectl proxy? I 'm using AWS instances, so can't have a web interface on localhost.
On the dashboard URL, returned from cluster-info, I 'm not getting any login page, just unauthorized in json.
Seconding ashish235's comment.
@ashish235 same issue
I had the same issue as @ashish235. How I solved it:
Run kubectl proxy as normal on your AWS instance. Now, on your local machine, port forward the proxy port (usually 8001) so that you can access it from localhost:
ssh -L 8001:localhost:8001 <user@server-ip>
You should now be able to access the dashboard using your browser at http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
@apoms - the above solution works like a charm... I used the same approach for accessing the dashboard built for my EKS cluster... I had installed kubectl, config , dashboard on a AWS server so that my team can ssh into it via jump box. After port forwarding it, can open it via local machine on a browser.
Let me have a summary:
if you use recommend yaml to deploy dashboard, you should only access your dashboard by https , and you should generete you certs, refer to guide
then , you can run kubectl proxy --address='0.0.0.0' --accept-hosts='^*$' to visit dashboard on "http://localhost:8001/ui" . This page need to login use token, generete refer to this page. Also you can add NodePort to you yaml and access to it use
if you deploy use http alternative method, you can only access your dashboard by
After deploy, you should also generate you token and add header Authorization: Bearer <token> for every request.
The offical wiki is a little bit confused so I reordered it here.
Thank you very much. They help.
Also, I think it could be better if an error message show up when I click sign up and fail.
if you deploy use http alternative method, you can only access your dashboard by
: , remeber to add it to yaml first!!
After deploy, you should also generate you token and add header Authorization: Bearerfor every request.
That is not correct. Alternative method is there if user wants to use his own reverse proxy and external IdP to configure access to the cluster.
Thank you so much apoms
I spend a lot of time. Love you buddy :)
So, it is not possible to use k8s dashboard and multipass without such hacks or extra configuration. So, Kubernetic can be an alternative, you just need to configure local kubectl:
multipass exec build-service -- /snap/bin/microk8s.config > ~/.kube/config
(to install kubectl on macOS: brew install kubectl).
You need just 2 commands:
$ kubectl port-forward svc/kubernetes-dashboard -n kube-system 6443:443
ssh -i EC2KeyPair.pem ec2-user@IP -L 6443:127.0.0.1:6443
Most helpful comment
I had the same issue as @ashish235. How I solved it:
Run
kubectl proxyas normal on your AWS instance. Now, on your local machine, port forward the proxy port (usually 8001) so that you can access it from localhost:You should now be able to access the dashboard using your browser at http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login