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 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””
kubernetes篇---3.创建Pod失败提示failed to

解决办法在node节点中配置
如果master也充当node节点的作用则也需要配置
查看/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt 是一个软链接,但是链接过去后并没有真实的/etc/rhsm,所以需要使用yum安装:在这里插入图片描述
yum install rhsm -y
kubernetes篇---3.创建Pod失败提示failed to

kubernetes篇---3.创建Pod失败提示failed to
kubernetes篇---3.创建Pod失败提示failed to 安装完成后,执行一下docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
kubernetes篇---3.创建Pod失败提示failed to

如果依然报错,可参考下面的方案:
在线安装rpm包
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
kubernetes篇---3.创建Pod失败提示failed to
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

kubernetes篇---3.创建Pod失败提示failed to 这两个命令会生成/etc/rhsm/ca/redhat-uep.pem文件.
在这里插入图片描述

顺得的话会得到下面的结果。

docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest 在这里插入图片描述
在这里插入图片描述
删除之前创建的容器并重新启动
kubernetes篇---3.创建Pod失败提示failed to
running即为成功启动在这里插入图片描述

你可能感兴趣的:(kubernetes)