What | Removed | Added |
---|---|---|
CC | priyanka.saggu@suse.com |
Thanks for the ticket, @Egbert Eich! For the crashing flannel pods: flannel, by default, expects the podCIDR to be set to "10.244.0.0/16"[2] at the time of "kubeadm init": > sudo kubeadm init --pod-network-cidr 10.244.0.0/16 (Or in case of custom podCIDR, same needs to be updated in the kube-flannel.yaml[1] file as well: ``` net-conf.json: | { "Network": "<customCIDR>", "Backend": { "Type": "vxlan" } } ``` ) [1] https://github.com/flannel-io/flannel/tree/master?tab=readme-ov-file#deploying-flannel-with-kubectl [2] https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml ----- For the coreDNS pods, they get stuck in "pending/containerCreating" state due to missing CNI plugins in /opt/cni/bin path. ``` > k describe pod coredns-86ccd44ff8-hz2lj -n kube-system Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 14s default-scheduler Successfully assigned kube-system/coredns-86ccd44ff8-hz2lj to 5 Warning FailedCreatePodSandBox 13s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "de201303e9a5802dbae988d668bed2640315da55b4654c2cdda3e5cffeec8ab4": plugin type="loopback" failed (add): failed to find plugin "loopback" in path [/opt/cni/bin] Normal SandboxChanged 13s kubelet Pod sandbox changed, it will be killed and re-created. ``` Flannel doesn't add these CNI binaries into the /opt/cni/bin path[3] Adding the binaries manually in the required path, fixes it: > mkdir -p /opt/cni/bin > curl -O -L https://github.com/containernetworking/plugins/releases/download/v1.4.0/cni-plugins-linux-amd64-v1.4.0.tgz > sudo tar -C /opt/cni/bin -xzf cni-plugins-linux-amd64-v1.4.0.tgz [3]https://github.com/flannel-io/flannel/issues/1715 I'll send an update to kube-flannel package for above.