New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access dashboard with no error #2540

Closed
jhcpokemon opened this Issue Nov 3, 2017 · 9 comments

Comments

Projects
None yet
4 participants
@jhcpokemon

jhcpokemon commented Nov 3, 2017

Environment
Dashboard version:1.7.1
Kubernetes version:1.8.1
Operating system:CentOS 7.4.1708
Node.js version:
Go version:
Steps to reproduce

1.use kubeadm,install k8s 1.8.1,all green
2.deploy influxdb,grafana,heapster and up
2. kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml deply dashboard
3.goto http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
4.type in token in kubernetes-dashboard-token-xxxxx secret

Observed result

The dashboard login page has no response,.and dashboard log show that
2017/11/03 07:29:41 [2017-11-03T07:29:41Z] Outcoming response to 10.244.0.1:47609 with 200 status code 2017/11/03 07:29:41 [2017-11-03T07:29:41Z] Incoming HTTP/2.0 GET /api/v1/login/status request from 10.244.0.1:47609: {} 2017/11/03 07:29:41 [2017-11-03T07:29:41Z] Outcoming response to 10.244.0.1:47609 with 200 status code

Expected result

I expected to entry dashboard.

Comments
@maciaszczykm

This comment has been minimized.

Member

maciaszczykm commented Nov 3, 2017

4.type in token in kubernetes-dashboard-token-xxxxx secret

What exactly have you done in this step? You should copy one of secrets' token.

@jhcpokemon

This comment has been minimized.

jhcpokemon commented Nov 3, 2017

I typed in the token of kubernetes-dashboard-token-jn7tx
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZC10b2tlbi1qbjd0eCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjQ4OTU2Zjg4LWMwNmQtMTFlNy1hMmYwLTAwMGMyOWNhM2Y5MSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.Q2o2pjdi65hwcZGntEuvT5ivbPAFpzbzLxkxDdepkPUtJKEQRMGGJUeyVOXWTXk2FMo6ZotTwX8_Up8qgt_nVcXllOktbQ9-OnP2DOn4J-3-bPSRgCd7BB7WUcZu1qZVyRlANsYyyhLLEOcdupcJTBAcM1aBrtePRLDKVSGT66IruTwBOs6jyU87Y4Jhm122qKMdLmDCDrVs64zBo0gqXUq-MO8cSuppBzzejZUuwvf6SPJZy95MSp8c54M1Ars_ncS8d74CXbZKyX-dPtsmjbt_9nkzb_21FegUo5F35u3-qJY3eOmnEr25Z8G47KYmWXCGP1T3PuVcHINQdbTB4w

@jhcpokemon

This comment has been minimized.

jhcpokemon commented Nov 3, 2017

I edit kubernetes-dashboard service,change the service type from ClusterIP to NodePort,and access dashboard with the ip and port instead of the proxy,in this case,everything is ok.

@gabrielfsousa

This comment has been minimized.

gabrielfsousa commented Nov 7, 2017

change the service type from ClusterIP to NodePort wont work for me :( i cant telnet to he port :(

@maciaszczykm

This comment has been minimized.

Member

maciaszczykm commented Nov 7, 2017

@jhcpokemon What happens after filling token and confirming it with Sign In button?

@jhcpokemon

This comment has been minimized.

jhcpokemon commented Nov 9, 2017

What happens after filling token and confirming it with Sign In button

Nothing happend,and no error in the chrome console.

@floreks

This comment has been minimized.

Member

floreks commented Nov 9, 2017

Nothing happend,and no error in the chrome console.

This can only happen if you are exposing Dashboard using kubectl proxy and trying to access it from other machine, not using localhost or 127.0.0.1 as domain.

@jhcpokemon

This comment has been minimized.

jhcpokemon commented Nov 10, 2017

Yes,I run the kubernetes cluster in my centos 7 virtual machine,and access the dashboard with the vm's IP,like this 192.168.189.129:9090/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login

@floreks

This comment has been minimized.

Member

floreks commented Nov 10, 2017

Then this is the real reason. Your initial description was misleading:

3.goto
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

Logging in is only available when accessing Dashboard over HTTPS or when domain is either localhost or 127.0.0.1. It's done this way for security reasons. Closing as this works as intended.

It is mentioned in our documentation:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment