sfgroups
sfgroups

Reputation: 19099

Kubernetes 1.8 Kubeadm configuration kubelet not starting on node

I have configured 1.8 cluster 1 master, 2 nodes using kuebadm. When I shutdown and restart the nodes kubelet is not starting, its compiling about the certificate. Same steps worked older version of Kubernetes.

Oct  2 22:02:32 k8sn-01 kubelet: I1002 22:02:32.854542    2795 client.go:75] Connecting to docker on unix:///var/run/docker.sock
Oct  2 22:02:32 k8sn-01 kubelet: I1002 22:02:32.854569    2795 client.go:95] Start docker client with request timeout=2m0s
Oct  2 22:02:32 k8sn-01 kubelet: I1002 22:02:32.860544    2795 feature_gate.go:156] feature gates: map[]
Oct  2 22:02:32 k8sn-01 kubelet: W1002 22:02:32.860638    2795 server.go:289] --cloud-provider=auto-detect is deprecated. The desired cloud provider should be set explicitly
Oct  2 22:02:32 k8sn-01 kubelet: W1002 22:02:32.861608    2795 server.go:381] invalid kubeconfig: invalid configuration: [unable to read client-cert /var/run/kubernetes/kubelet-client.crt for default-auth due to open /var/run/kubernetes/kubelet-client.crt: no such file or directory, unable to read client-key /var/run/kubernetes/kubelet-client.key for default-auth due to open /var/run/kubernetes/kubelet-client.key: no such file or directory]
Oct  2 22:02:32 k8sn-01 kubelet: error: failed to run Kubelet: no client provided, cannot use webhook authorization
Oct  2 22:02:32 k8sn-01 systemd: kubelet.service: main process exited, code=exited, status=1/FAILURE
Oct  2 22:02:32 k8sn-01 systemd: Unit kubelet.service entered failed state.
Oct  2 22:02:32 k8sn-01 systemd: kubelet.service failed.

Not sure why its missing the certificate after reboot. I removed and re-created the cluster multiple times same result.

NAME      STATUS     ROLES     AGE       VERSION
k8sm-01   Ready      master    10m       v1.8.0
k8sn-01   NotReady   <none>    6m        v1.8.0
k8sn-02   NotReady   <none>    6m        v1.8.0

Any tips to resolve this issue?

Thanks SR

Upvotes: -1

Views: 3452

Answers (1)

Jordan Liggitt
Jordan Liggitt

Reputation: 18111

This is due to https://github.com/kubernetes/kubernetes/issues/53288

For kubeadm, this issue was just resolved with a config change in an updated package (rpm 1.8.0-1, deb 1.8.0-01)

If you already have a node in this state, you must remove the existing /etc/kubernetes/kubelet.conf file which contains references to erased certificate files as well.

Upvotes: 2

Related Questions