Dashboard: Dashboard fails to start with dashboard.crt: no such file

Created on 22 Sep 2017  路  11Comments  路  Source: kubernetes/dashboard

Brand new kubeadm 1.7 kubernetes environment, run:

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Pod fails to start with:

2017/09/22 16:42:54 Starting overwatch
2017/09/22 16:42:54 Using in-cluster config to connect to apiserver
2017/09/22 16:42:54 Using service account token for csrf signing
2017/09/22 16:42:54 No request provided. Skipping authorization
2017/09/22 16:42:54 Successful initial request to the apiserver, version: v1.7.6
2017/09/22 16:42:54 New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting
2017/09/22 16:42:54 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system
2017/09/22 16:42:54 Initializing secret synchronizer synchronously using secret kubernetes-dashboard-key-holder from namespace kube-system
2017/09/22 16:42:54 Initializing JWE encryption key from synchronized object
2017/09/22 16:42:54 Creating in-cluster Heapster client
2017/09/22 16:42:54 Trying to update secret with same object. Skipping
2017/09/22 16:42:54 Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in 30 seconds.
2017/09/22 16:42:54 Serving securely on HTTPS port: 8443
2017/09/22 16:42:54 open /certs/dashboard.crt: no such file or directory

Most helpful comment

I am seeing exactly same issue with

Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:27:35Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:16:41Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

And Dashboard from:
https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Dashboard pod status is:
kube-system kubernetes-dashboard-7f9dbb8685-m5dcb 0/1 CrashLoopBackOff 3596 12d

Logs:
2017/10/26 07:09:59 Starting overwatch
2017/10/26 07:09:59 Using in-cluster config to connect to apiserver
2017/10/26 07:09:59 Using service account token for csrf signing
2017/10/26 07:09:59 No request provided. Skipping authorization
2017/10/26 07:09:59 Successful initial request to the apiserver, version: v1.8.1
2017/10/26 07:09:59 New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting
2017/10/26 07:09:59 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system
2017/10/26 07:09:59 Initializing secret synchronizer synchronously using secret kubernetes-dashboard-key-holder from namespace kube-system
2017/10/26 07:09:59 Initializing JWE encryption key from synchronized object
2017/10/26 07:09:59 Trying to update secret with same object. Skipping
2017/10/26 07:09:59 Creating in-cluster Heapster client
2017/10/26 07:09:59 Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in 30 seconds.
2017/10/26 07:09:59 Serving securely on HTTPS port: 8443
2017/10/26 07:09:59 open /certs/dashboard.crt: no such file or directory
[root@mak8s1 ~]#

All 11 comments

Remove and deploy again. This is some kubernetes issue. Main container is sometimes starting before initContainer finishes its job.

I tried that, didn't work and that log is from the second container.

First init container is supposed to generate certificates and kubernetes should mount them into the second container. Check logs from init container if it does what it's supposed to.

@floreks
I am getting the same issue here. See the screen shot for the logs on the init container:
screen shot 2017-10-03 at 5 08 14 pm

My secrets look like this:
screen shot 2017-10-03 at 5 11 01 pm

I am using the deployment here: https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

@leftyhitchens probably this is related to https://github.com/kubernetes/kubernetes/issues/53382 issue. With high enough resource limits everything works as expected. Unfortunately this has to be fixed on kubernetes side or you have to generate certificates on your own and follow Recommended setup guide.

Okay, thanks. I will generate them manually.

I am seeing exactly same issue with

Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:27:35Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:16:41Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

And Dashboard from:
https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

Dashboard pod status is:
kube-system kubernetes-dashboard-7f9dbb8685-m5dcb 0/1 CrashLoopBackOff 3596 12d

Logs:
2017/10/26 07:09:59 Starting overwatch
2017/10/26 07:09:59 Using in-cluster config to connect to apiserver
2017/10/26 07:09:59 Using service account token for csrf signing
2017/10/26 07:09:59 No request provided. Skipping authorization
2017/10/26 07:09:59 Successful initial request to the apiserver, version: v1.8.1
2017/10/26 07:09:59 New synchronizer has been registered: kubernetes-dashboard-key-holder-kube-system. Starting
2017/10/26 07:09:59 Starting secret synchronizer for kubernetes-dashboard-key-holder in namespace kube-system
2017/10/26 07:09:59 Initializing secret synchronizer synchronously using secret kubernetes-dashboard-key-holder from namespace kube-system
2017/10/26 07:09:59 Initializing JWE encryption key from synchronized object
2017/10/26 07:09:59 Trying to update secret with same object. Skipping
2017/10/26 07:09:59 Creating in-cluster Heapster client
2017/10/26 07:09:59 Metric client health check failed: the server could not find the requested resource (get services heapster). Retrying in 30 seconds.
2017/10/26 07:09:59 Serving securely on HTTPS port: 8443
2017/10/26 07:09:59 open /certs/dashboard.crt: no such file or directory
[root@mak8s1 ~]#

How do we generate certificates if $HOME/certs directory does not exist?

$ kubectl create secret generic kubernetes-dashboard-certs --from-file=$HOME/certs -n kube-system
error: error reading /Users/pjadda/certs: no such file or directory

i am facing same issue

i am facing same issue

Same issue for me.
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-26T16:55:54Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.5", GitCommit:"f01a2bf98249a4db383560443a59bed0c13575df", GitTreeState:"clean", BuildDate:"2018-03-19T15:50:45Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donspaulding picture donspaulding  路  5Comments

Eddman picture Eddman  路  4Comments

pavankjadda picture pavankjadda  路  3Comments

maciaszczykm picture maciaszczykm  路  4Comments

mhobotpplnet picture mhobotpplnet  路  3Comments