k8s1.21安装flannel插件(v0.13.1-rc2)报错
所有节点一直notready
[root@master ~]# kubectl get node
NAME STATUS ROLES AGE VERSION
master NotReady control-plane,master 12h v1.21.0
node1 NotReady <none> 12h v1.21.0
node2 NotReady <none> 12h v1.21.0
查看kubelet日志报错
Nov 20 21:00:53 master kubelet[34695]: I1120 21:00:53.926251 34695 cni.go:204] "Error validating CNI config list" configList="{\n \"name\": \"cbr0\",\n \"plugins\": [\n {\n \"type\": \"flannel\",\n \"delegate\": {\n \"hairpinMode\": true,\n \"isDefaultGateway\": true\n }\n },\n {\n \"type\": \"portmap\",\n \"capabilities\": {\n \"portMappings\": true\n }\n }\n ]\n}\n" err="[failed to find plugin \"flannel\" in path [/opt/cni/bin]]"
Nov 20 21:00:53 master kubelet[34695]: I1120 21:00:53.926314 34695 cni.go:239] "Unable to update cni config" err="no valid networks found in /etc/cni/net.d"
Nov 20 21:00:55 master kubelet[34695]: E1120 21:00:55.170484 34695 kubelet.go:2218] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"
Nov 20 21:00:58 master kubelet[34695]: I1120 21:00:58.935344 34695 cni.go:204] "Error validating CNI config list" configList="{\n \"name\": \"cbr0\",\n \"plugins\": [\n {\n \"type\": \"flannel\",\n \"delegate\": {\n \"hairpinMode\": true,\n \"isDefaultGateway\": true\n }\n },\n {\n \"type\": \"portmap\",\n \"capabilities\": {\n \"portMappings\": true\n }\n }\n ]\n}\n" err="[failed to find plugin \"flannel\" in path [/opt/cni/bin]]"
Nov 20 21:00:58 master kubelet[34695]: I1120 21:00:58.935442 34695 cni.go:239] "Unable to update cni config" err="no valid networks found in /etc/cni/net.d"
Nov 20 21:01:00 master kubelet[34695]: E1120 21:01:00.269921 34695 kubelet.go:2218] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"