Kubernetes 报错:"image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest ..."

发现 pod 一直处于ContainerCreating状态,查看 pod 详情:

kubectl describe pod xxx

发现报错:

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)"

解决方法:

yum install -y *rhsm*

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

你可能感兴趣的:(Kubernetes 报错:"image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest ...")