k3s: K3s Cluster created with weave don't have CNI loopback driver
Describe the bug Similar to #596 on rke. After installed weave, coredns complains about missing loopback driver in /opt/cni/bin.
E0311 21:19:12.004535 823 kuberuntime_manager.go:677] createPodSandbox for pod "coredns-7748f7f6df-8nzpj_kube-system(fe57b2c2-4437-11e9-b3ee-b827ebd31783)" failed: rpc error: code = Unknown desc = failed to setup network for sandbox "2938859438754e66cfa02804b9d857b029f1876cdc898879ad9d6a8abe0b221e": failed to find plugin "loopback" in path [/opt/cni/bin]
To Reproduce
$ sudo k3s server --disable-agent --no-deploy traefik --container-runtime-endpoint=/run/crio/crio.sock
$ sudo k3s agent --no-flannel --server https://192.168.1.6:6443 --token $(sudo cat /var/lib/rancher/k3s/server/node-token)
$ k3s kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(k3s kubectl version | base64 | tr -d '\n')"
Expected behavior
All CNI drivers for the network
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 16 (3 by maintainers)
Ah I see, yes. We don’t put them in /opt/cni/bin, they’re in /var/lib/rancher/k3s/data/current/bin alongside all our other userspace binaries. Our packaged flannel is configured to look there automatically, so if you install your own CNI you will need to grab the plugins yourself or point it at the correct path to find ours.
Faced the same
In logs
I had to manually install files from https://github.com/containernetworking/plugins/releases/download/v0.6.0/cni-plugins-amd64-v0.6.0.tgz
As a workaround, this is working : https://github.com/kubernetes-sigs/cri-o/blob/master/tutorial.md#cni-plugins