K8S (kubernetes)pod服务 Status 处于 Containercreating,Ready处于0/1 的问题解决

当K8S Pod状态显示为ContainerCreating且Ready为0/1时,通常意味着容器创建失败。错误信息涉及到Docker证书问题。解决步骤包括检查/etc/docker/certs.d/registry.access.redhat.com/目录下的证书链接,发现redhat-ca.crt为无效链接。通过卸载subscription-manager-rhsm-certificates并安装python-rhsm-certificates.x86_64,成功解决问题,Pod状态转为Running,Ready变为1/1。
摘要由CSDN通过智能技术生成

运行命令

kubectl get pod

pod的status是ContainerCreating,Ready处于0/1

[root@localhost ca]# kubectl get pod
NAME                       READY     STATUS              RESTARTS   AGE
my-nginx-379829228-mmsww   0/1       ContainerCreating   0          1h

错误信息为

Error syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because there are no credentials on this request.  details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)"

根据网上资料进行手工pull,提示报错误

/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory

cd到/etc/docker/certs.d/registry.access.redhat.com/看到有一个redhat-ca.crt文件,使用 l

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值