K8s cni plugin issue: cni plugin not initialized while kube-flannel is running

Ran into this problem again so I spent more time trying to solve it. Although I haven’t been able to pinpoint the root cause yet, I suspect it’s a containerd issue.

I can reproduce it with following steps:

  • kubeadm reset
  • sudo ip link set cni0 down && sudo ip link delete cni0
  • sudo rm -rf /etc/cni/net.d/
  • initialize the k8s again with flannel CNI plugin

restart containerd can solve this issue

sudo systemctl restart containerd

See also: Troubleshooting CNI plugin-related errors

4 Likes