k8s常见故障–yaml文件检查没有问题 pod起不来(一直处于创建中)

作者 : admin 本文共1482个字,预计阅读时间需要4分钟 发布时间: 2024-06-9 共3人阅读

故障信息

pod一直处于创建中
k8s常见故障–yaml文件检查没有问题 pod起不来(一直处于创建中)插图
查看pod详细信息显示

kubectl describe pod 容器id

k8s常见故障–yaml文件检查没有问题 pod起不来(一直处于创建中)插图(1)

文字
Events:
Type Reason Age From Message

Normal Scheduled 5m30s default-scheduler Successfully assigned default/nginx-server2-f97c6b9d5-d6dsp to worker02
Warning FailedCreatePodSandBox 5m29s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “5e93531990f73e2b657ee34e3aca1ed846c3d2ebcc2e171c917f4095a4b5c09b” network for pod “nginx-server2-f97c6b9d5-d6dsp”: networkPlugin cni failed to set up pod “nginx-server2-f97c6b9d5-d6dsp_default” network: plugin type=“calico” failed (add): error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container “5e93531990f73e2b657ee34e3aca1ed846c3d2ebcc2e171c917f4095a4b5c09b” network for pod “nginx-server2-f97c6b9d5-d6dsp”: networkPlugin cni failed to teardown pod “nginx-server2-f97c6b9d5-d6dsp_default” network: plugin type=“calico” failed (delete): error getting ClusterInformation: connection is unauthorized: Unauthorized]
Normal SandboxChanged 82s (x20 over 5m28s) kubelet Pod sandbox changed, it will be killed and re-created.
Warning FailedKillPod 29s (x5 over 79s) kubelet error killing pod: failed to “KillPodSandbox” for “134b665c-5400-414f-9849-9c1c23fafeb2” with KillPodSandboxError: “rpc error: code = Unknown desc = networkPlugin cni failed to teardown pod “nginx-server2-f97c6b9d5-d6dsp_default” network: plugin type=“calico” failed (delete): error getting ClusterInformation: connection is unauthorized: Unauthorized”

原因

Calico 网络插件的问题

解决方法

重启各节点的docker即可

systemctl restart docker

注:
如果这条命令显示pull代表本地没有所需镜像,正在下载,稍等即可

kubectl describe pod 容器id
本站无任何商业行为
个人在线分享 » k8s常见故障–yaml文件检查没有问题 pod起不来(一直处于创建中)
E-->