情况如下,更新 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