0

I just installed a single-node kubernetes cluster on CentOS7 using kubeadm according to this manual, then installed the kubernetes-dashboard extension. But the pod status is CrashLoopBackOff.

I have checked the logs of the dashboard docker container and found following error:

...
2017/10/24 10:15:57 Serving securely on HTTPS port: 8443
2017/10/24 10:15:57 Couldn't read CA certificate: open : no such file or directory

What does this mean?

lfree
  • 1,880
  • 3
  • 24
  • 39

1 Answers1

0

you need to mount your certificate into your kubernetes-dashboard deployment so it can access your SSL/TLS Certificate.

i assume you are using the following deployment: https://github.com/kubernetes/dashboard/blob/master/src/deploy/recommended/kubernetes-dashboard.yaml

so you need to add your key and public key to your kubernetes secret "kubernetes-dashboard-certs".

For Cert Generation see: https://github.com/kubernetes/dashboard/wiki/Certificate-management

For more information about Secrets in K8s see: https://kubernetes.io/docs/concepts/configuration/secret/

gogene
  • 11
  • 2
  • A secret name *'kubernetes-dashboard-certs'* has already been created automatically by the initContainer *'kubernetes-dashboard-init'*. – lfree Oct 26 '17 at 00:59
  • do you see the files dashboard.crt and dashboard.key in "kubectl get secret kubernetes-dashboard-certs -o yaml"? the documentation assumes that you have a self signed certificate and the key named "dashboard.crt and dashboard.key" in "$HOME/certs/". – gogene Oct 27 '17 at 14:06
  • Yes, there are the two files. I had posted an issue [here](https://github.com/kubernetes/dashboard/issues/2518) – lfree Oct 30 '17 at 09:07