解決 Kubernetes 創建pod一直處於ContainerCreating 狀態

用k8s創建完pod後,查了一下pods狀態,發現都在containercreationg狀態中

 ==> kubectl get pods

用kubectl describe查看 pods的詳情,發現 registry.access.redhat.com/rhel7/pod-infrastructure:latest 鏡像報錯

 ==> kubectl describe pod mysql

使用docker pull  拉取鏡像,缺失rhsm 文件

==> docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

yum 安裝 rhsm,發現 python-rhsm-certificates  已被 subscription-manager-rhsm-certificates 替換,無法yum 成功

==> yum install *rhsm*

使用 wget 獲取python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm  rpm包並安裝 python-rhsm-certificates

==>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

 

再次使用使用docker pull  拉取鏡像

==> docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

pods 已成功 在Running 狀態中

 ==> kubectl get pods

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章