kubernetes:关于创建pod中结点始终处于creating状态的问题解决(Error syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com/rhel7/...)


通过以下代码获得certificates,注意,必须对于master结点和两个node结点机器上都需要获取

通过 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

注意必须是对每台机器都使用这个指令,然后就能获取到certificate。

 

 

 接下来检查pod的状态就能发现pod已经成功被创建,并且状态是running

 

 

 

转载自:https://www.jianshu.com/p/adf2aebdc381


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM