kubernetes篇---3.创建Pod失败提示failed to "StartContainer" for "POD" with ImagePullBackOff
具体报错信息如下Error syncing pod, skipping: failed to “StartContainer” for “POD” with ErrImagePul**l: “image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because t.
具体报错信息如下
Error syncing pod, skipping: failed to “StartContainer” for “POD” with ErrImagePul**l: “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)”
Warning FailedSync Error syncing pod, skipping: failed to “StartContainer” for “POD” with ImagePullBackOff: “Back-off pulling image “registry.access.redhat.com/rhel7/pod-infrastructure:latest””
解决办法在node节点中配置
如果master也充当node节点的作用则也需要配置
查看/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt 是一个软链接,但是链接过去后并没有真实的/etc/rhsm,所以需要使用yum安装:
yum install rhsm -y
安装完成后,执行一下docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
如果依然报错,可参考下面的方案:
在线安装rpm包
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
这两个命令会生成/etc/rhsm/ca/redhat-uep.pem文件.
顺得的话会得到下面的结果。
docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
删除之前创建的容器并重新启动
running即为成功启动
更多推荐
所有评论(0)