无法在 kubernets 中设置集群

无法在 kubernets 中设置集群

我正在尝试在 centos 7 虚拟机上使用 kubernetes 设置集群,并坚持将工作人员加入集群的部分。

我已经成功设置了 master 并获取了令牌,我将令牌添加到了第二个 centos 7 系统上,但是没有任何反应。

在挖掘日志时,我得到了以下内容,但不太确定到底是什么原因造成的。我已在两台服务器的 /etc/hosts 文件中添加了主机条目,并尝试重置主配置两次。

以下是来自工作机器的日志

Apr 22 20:11:12 ks01 kubelet: E0422 20:11:12.647230   14902 kubelet.go:2267] node "ks01" not found
Apr 22 20:11:12 ks01 kubelet: E0422 20:11:12.651006   14902 controller.go:136] failed to ensure node lease exists, will retry in 400ms, error: Unauthorized
Apr 22 20:11:12 ks01 kubelet: E0422 20:11:12.853918   14902 kubelet.go:2267] node "ks01" not found
Apr 22 20:11:12 ks01 kubelet: W0422 20:11:12.854042   14902 pod_container_deletor.go:77] Container "82896667dd899c60e767f5c25a0a3da52a2c750cc0ac280eb0a3a9b6b4f3d1d3" not found in pod's containers
Apr 22 20:11:12 ks01 kubelet: I0422 20:11:12.854076   14902 kubelet_node_status.go:294] Setting node annotation to enable volume controller attach/detach
Apr 22 20:11:12 ks01 kubelet: E0422 20:11:12.858635   14902 csi_plugin.go:271] Failed to initialize CSINodeInfo: error updating CSINode annotation: timed out waiting for the condition; caused by: Unauthorized
Apr 22 20:11:12 ks01 kubelet: I0422 20:11:12.893113   14902 kubelet_node_status.go:70] Attempting to register node ks01
Apr 22 20:11:12 ks01 kubelet: E0422 20:11:12.895442   14902 kubelet_node_status.go:92] Unable to register node "ks01" with API server: Unauthorized

相关内容