failed to find plugin “flannel” in path [/opt/cni/bin]
找个集群内部正常的服务器,把/opt/cni/bin/flannel拷贝到报错这台的相同位置,然后删除pod重新创建即可。
正解应该到下面github下载对应版本的flannel https://github.com/containernetworking/plugins/releases
failed to allocate for range 0: no IP addresses available in range set…… 经常发生在断电之后。
粗暴方案:到对应的worker上执行
rm -rf /etc/cni/
rm -rf /var/lib/cni/
reboot
柔和一些的办法:
在master上看看故障的worker上有哪些ip正在被pod使用
然后到对应的worker上执行
打开/var/lib/cni/,到flannel,networks/cbr0/和results里找到不用的ip,给删掉。
参考
https://blog.csdn.net/qq_33161479/article/details/121263959