在备master节点加入集群时执行 命令报错

 kubeadm join 192.168.50.11:7443 --token abcdef.0123456789abcdef --discovery-token-ca-cert-hash sha256:7acb2bf7f997b2460fb085cebf91b6b1138e38056e00bda7139b6a92c0bb00d7 --experimental-control-plane

报错信息:error creating local etcd static pod manifest file: etcdserver: re-configuration failed due to not enough started members

 执行以下命令

[root@k8s-master3 ~]# kubeadm reset
[root@k8s-master3 ~]# iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
[root@k8s-master3 ~]# rm -rf /etc/kubernetes/*
[root@k8s-master3 ~]# rm -rf /root/.kube/
[root@k8s-master3 ~]# mkdir -p /etc/kubernetes/pki/etcd
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/ca.crt /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/ca.key /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/sa.key /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/sa.pub /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/front-proxy-ca.crt /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/front-proxy-ca.key /etc/kubernetes/pki/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/etcd/ca.crt /etc/kubernetes/pki/etcd/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/pki/etcd/ca.key /etc/kubernetes/pki/etcd/
[root@k8s-master3 ~]# scp root@k8s-master1:/etc/kubernetes/admin.conf /etc/kubernetes/admin.conf                                                                                                                                                             

 在次将节点加入到集群之中就可以成功。

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐