kubernetes - 无法加入 VMWare 上的主节点

问题描述

我在 VMWare Workstation 上创建了 2 个 Centos 虚拟机,主节点的静态 IP 为 192.168.1.10,第一个节点的静态 IP 为 192.168.1.20。 init 在 master 上消失了,但 join 失败而没有明显的错误。 我在两台虚拟机上都使用一个以太网接口。

上师

[root@master-node ~]# kubectl get nodes
NAME          STATUS   ROLES    AGE   VERSION
master-node   Ready    <none>   52m   v1.20.5
[root@master-node ~]# kubectl cluster-info
Kubernetes control plane is running at https://192.168.1.10:6443
To further debug and diagnose cluster problems,use 'kubectl cluster-info dump'.
[root@master-node ~]# kubeadm token create --print-join-command
kubeadm join 192.168.1.10:6443 --token 9it8xw.2m37kazjusvgnjeu     --discovery-token-ca-cert-hash sha256:5d17490ab49f5a643efbe6635211466273c3dd774004eaf3db12ef7bf38bc840 

和节点

root@worker-node1 ~]# kubeadm join 192.168.1.10:6443 --token 8ix113.hgprb2dp3g7e4dgp     --discovery-token-ca-cert-hash
sha256:5d17490ab49f5a643efbe6635211466273c3dd774004eaf3db12ef7bf38bc840
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 0.10.5. Latest validated version: 19.03
error execution phase preflight: Couldn't validate the identity of the API Server: configmaps
cluster-info" is forbidden: User "system:anonymous" cannot get resource "configmaps" in API group "" in the namespace "kube-public"
To see the stack trace of this error execute with --v=5 or higher

连接正常

[root@worker-node1 ~]# telnet 192.168.1.10 6443
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
^C

代码在这里

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)