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