Kubernetes failed to setup network for pod after executed kubeadm reset

后端 未结 6 1103
故里飘歌
故里飘歌 2021-02-03 12:41

I initialized Kubernetes with kubeadm init, and after I used kubeadm reset to reset it I found --pod-network-cidr was wrong. After correct

6条回答
  •  醉话见心
    2021-02-03 13:14

    I figured it out, if you change --pod-network-cidr when you reinitialize kubernetes via kubeadm init, you should delete some auto-created things, just follow the steps below before you execute kubeadm init again:

    1. execute kubeadm reset on master and nodes.

    2. execute etcdctl rm --recursive registry reset data in etcd.

    3. rm -rf /var/lib/cni on master and nodes

    4. rm -rf /run/flannel on master and nodes

    5. rm -rf /etc/cni on master and nodes

    6. ifconfig cni0 down on master and nodes

    7. brctl delbr cni0 on master and nodes

    Now, my Kubernetes works fine :)

提交回复
热议问题