Kube flannel in CrashLoopBackOff status Kube flannel in CrashLoopBackOff status kubernetes kubernetes

Kube flannel in CrashLoopBackOff status


For flannel to work correctly, you must pass --pod-network-cidr=10.244.0.0/16 to kubeadm init.


Try this:

Failed to acquire lease simply means, the pod didn't get the podCIDR. Happened with me as well although the manifest on master-node says podCIDR true but still it wasn't working and funnel going in crashbackloop.This is what i did to fix it.

From the master-node, first find out your funnel CIDR

sudo cat /etc/kubernetes/manifests/kube-controller-manager.yaml | grep -i cluster-cidr

Output:

- --cluster-cidr=172.168.10.0/24

Then run the following from the master node:

kubectl patch node slave-node-1 -p '{"spec":{"podCIDR":"172.168.10.0/24"}}'

where, slave-node-1 is your node where acquire lease is failingpodCIDR is the cidr that you found in previous command

Hope this helps.


I had a similar problem. I did the following steps to make it work:

  • Delete the nodes from the master by kubeadm reset on the worker node.

  • Clear the iptables rules by iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X.

  • Clerar the config file by rm -rf $HOME/.kube/config.

  • Reboot the worker node.

  • Disable the Swap on the worker node by swapoff -a.

  • Join the master node, again.