K8s升级后coredns容器创建失败,出现如下错误
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m39s default-scheduler Successfully assigned kube-system/coredns-64897985d-v6m6c to k8s-m
Warning FailedCreatePodSandBox 9m39s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "6c9b442d7ccdfbfab06720f9802c5909769881d98e2cf6a3d965c08d45f28319": plugin type="flannel" failed (add): failed to find plugin "flannel" in path [/opt/cni/bin]
Normal SandboxChanged 4m28s (x25 over 9m38s) kubelet Pod sandbox changed, it will be killed and re-created.
解决办法是从网上下载插件安装
wget https://github.com/containernetworking/plugins/releases/download/v0.8.6/cni-plugins-linux-amd64-v0.8.6.tgz
tar zxvf cni-plugins-linux-amd64-v0.8.6.tgz
cp flannel /opt/cni/bin/
问题是解决了,但为什么以前没有这个问题:(