Kubernetes failed to setup network for pod after executed kubeadm reset Kubernetes failed to setup network for pod after executed kubeadm reset kubernetes kubernetes

Kubernetes failed to setup network for pod after executed kubeadm reset


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 :)


This document helped a lot:

https://github.com/feiskyer/kubernetes-handbook/blob/master/en/troubleshooting/pod.md

specially the part which applies to this issue:

$ ip link set cni0 down$ brctl delbr cni0  

If you do this on the api servers and then just reboot the machine it should stabilize pretty quickly.


What helped for me:

  • ip link set cni0 down

    brctl delbr cni0

    Delete and re-apply flannel

So no need to build up your cluster again