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

故障信息

pod一直处于创建中
在这里插入图片描述
查看pod详细信息显示

kubectl describe pod 容器id

在这里插入图片描述

文字
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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爱吃龙利鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值