我已经使用kuebadm配置了1.8个集群1主服务器,2个节点。当我关闭并重启节点时,kubelet没有启动,它编译了证书。相同的步骤适用于旧版本的kubernets。
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.
不确定为什么它在重启后丢失了证书。我删除并重新创建了多次相同结果的群集。
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
有任何解决此问题的提示吗?
由于 SR
答案 0 :(得分:2)
这是由于https://github.com/kubernetes/kubernetes/issues/53288
对于kubeadm,此问题刚刚在更新的软件包中更改了配置(rpm 1.8.0-1,deb 1.8.0-01)
如果您已经有一个处于此状态的节点,则必须删除包含对已删除证书文件的引用的现有/etc/kubernetes/kubelet.conf
文件。