Dashboard: i can access dashboard in Linux with https://masternodeIP:port with googlechrome, but can't do that in Windows.

Created on 10 Apr 2018  ·  8Comments  ·  Source: kubernetes/dashboard

Environment


i can access dashboard in Linux browser with https://masternodeIP:port , but can't access in Windows.
the computers are all in the same local network, and can reach each other.
the error code shown in the windows' browser is NET::ERR_CERT_INVALID.

Dashboard version: 1.8.3
Kubernetes version: 1.9
Operating system: linux/ windows
Node.js version:
Go version:

Most helpful comment

@GoodJoey I met the same problem.
When I create a dashboard deployment, this solve the NET::ERR_CERT_INVALID problem of chrome:

$ mkdir certs
$ openssl req -nodes -newkey rsa:2048 -keyout certs/dashboard.key -out certs/dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=kubernetes-dashboard"
$ openssl x509 -req -sha256 -days 365 -in certs/dashboard.csr -signkey certs/dashboard.key -out certs/dashboard.crt
$ kubectl create secret generic kubernetes-dashboard-certs --from-file=certs -n kube-system
$ kubectl create -f kubernetes-dashboard.yaml

All 8 comments

我之前也有这个问题。后来我通过自己生成证书文件后这个问题没有了。证书生成的文档:https://github.com/kubernetes/dashboard/wiki/Certificate-management

@GoodJoey I met the same problem.
When I create a dashboard deployment, this solve the NET::ERR_CERT_INVALID problem of chrome:

$ mkdir certs
$ openssl req -nodes -newkey rsa:2048 -keyout certs/dashboard.key -out certs/dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=kubernetes-dashboard"
$ openssl x509 -req -sha256 -days 365 -in certs/dashboard.csr -signkey certs/dashboard.key -out certs/dashboard.crt
$ kubectl create secret generic kubernetes-dashboard-certs --from-file=certs -n kube-system
$ kubectl create -f kubernetes-dashboard.yaml

https://masternodeIP:port - not sure which port you mean. Most likely your setup only allows local bindings to this port. Use kubectl proxy to connect from outside to apiserver. Or expose Dashboard with nodeport or loadbalancer. Make sure to have proper SSL & authentication in place

@xuchenhao001
thanks, i will take a try
@cheld
by https://masternodeIP:port , i meant i can access the dashboard from another linux machine.
but can't access the dashboard from another windows machine. seems like some certification error.

"/C=/ST=/L=/O=/OU=/CN=kubernetes-dashboard"

this info should specify for the case when you create it, for example, this info should get from this command "openssl x509 -req -sha256 -days 365 -in dashboard.csr -signkey dashboard.key -out dashboard.crt"

https://github.com/kubernetes/dashboard/issues/3472

This solution works !!!

  1. Install OpenSSL on windows
  2. Create .crt, .csr and .key(in windows - Host machine)
    openssl req -nodes -newkey rsa:2048 -keyout certs/dashboard.key -out certs/dashboard.csr -subj "/C=/ST=/L=/O=/OU=/CN=kubernetes-dashboard"
    openssl x509 -req -sha256 -days 365 -in certs/dashboard.csr -signkey certs/dashboard.key -out certs/dashboard.crt
  3. scp it onto kubernetes master VM
  4. Create secret
    $ kubectl create secret generic kubernetes-dashboard-certs --from-file=certs -n kube-system
  5. Create dashboard(recommended .yaml to be modified to use type: NodePort & nodePort: 32323(eg.)
    $ kubectl create -f kubernetes-dashboard.yaml
  6. From host machine(Chrome browser) - Use https://:32323(eg.,)
  7. It still gives you a warning message, but if drop down error on the page and "Proceed", page should load

FYI for those using v2 of the dashboard you will need to change the namespace in which you create the kubernetes-dashboard-certs secret as it has been moved to kubernetes-dashboard from kube-system.

FYI for those using v2 of the dashboard you will need to change the namespace in which you create the kubernetes-dashboard-certs secret as it has been moved to kubernetes-dashboard from kube-system.

thansk..i also notice it so create the namespace first then apply the yaml file..
which works for me..
cool.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donspaulding picture donspaulding  ·  5Comments

mhobotpplnet picture mhobotpplnet  ·  3Comments

wu105 picture wu105  ·  3Comments

eloyekunle picture eloyekunle  ·  3Comments

maciaszczykm picture maciaszczykm  ·  4Comments