k8s创建容器pod一直处于ContainerCreating,

刚刚在自学过程中发现创建pod之后,一直处于ContainerCreating状态;

之后我用kubectl describe pod nginx,发现报错:open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory。
去文件夹查看之后,发现redhar-ca.crt文件存在,不过用命令ll查看,发现其链接文件/etc/rhsm/ca/redhat-uep.pem,不存在,那就创建此文件吧。
经过各种百度,终于找到了一个好的解决方案,如下:
1、在docker安装的node节点上安装rhsm

yum install *rhsm*

安装完成后,执行一下docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

如果依然报错,可参考下面的方案:
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem
以上操作之后证书已经生成了;
OK,再尝试下,docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest,没问题了。

转载于:https://blog.51cto.com/12708233/2375844

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值