本文主要是介绍k8s pod 无法启动一直ContainerCreating,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
情况如下,更新 pod 时,一直在ContainerCreating
查看详细信息如下
Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “334d991a478b9640c66c67b46305122d7f0eefc98b2b4e671301f1981d9b9bc6” network for pod “yupay-vip-5c4bb7db5c-s6m52”: networkPlugin cni failed to set up pod “yupay-vip-5c4bb7db5c-s6m52_yupay” network: error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container “334d991a478b9640c66c67b46305122d7f0eefc98b2b4e671301f1981d9b9bc6” network for pod “yupay-vip-5c4bb7db5c-s6m52”: networkPlugin cni failed to teardown pod “yupay-vip-5c4bb7db5c-s6m52_yupay” network: error getting ClusterInformation: connection is unauthorized: Unauthorized]
解决方案
根据百度的资料,是 calico 网络组件证书过期导致
执行一下命令重启一下 calico 即可
kubectl rollout restart -n kube-system DaemonSet/calico-node
这篇关于k8s pod 无法启动一直ContainerCreating的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!