Kubernetes创建启动容器:
--------------------------------------------------------------------
[docker@localhost ~]$ kubectl create -f kubernetes_yaml/
replicationcontroller "mysql" created
service "mysql" created
replicationcontroller "myweb" created
service "myweb" created
--------------------------------------------------------------------
检查pod:
--------------------------------------------------------------------
[docker@localhost ~]$ kubectl get pods
NAME READY STATUS RESTARTS AGE
mysql-7shv6 0/1 ContainerCreating 0 6s
myweb-2vg5v 0/1 ContainerCreating 0 6s
myweb-hz3zd 0/1 ContainerCreating 0 6s
--------------------------------------------------------------------
这是容器状态都属于ContainerCreating,而不是Running
解决方案:
方案一:
--------------------------------------------------------------------
[root@localhost ~]# yum install *rhsm* -y
[root@localhost ~]# docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
--------------------------------------------------------------------
到这里如果检查pod状态还是ContainerCreating,尝试方案二
方案二:
--------------------------------------------------------------------
[root@localhost ~]# docker pull docker.io/kubernetes/pause
[root@localhost ~]# docker tag docker.io/kubernetes/pause gcr.io/google_containers/pause-amd64:3.0
[root@k8s ~]# docker rmi -f docker.io/kubernetes/pause
--------------------------------------------------------------------
到这里先进行delete,在重新创建容器
--------------------------------------------------------------------
[docker@localhost ~]$ kubectl delete -f kubernetes_yaml/
replicationcontroller "mysql" deleted
service "mysql" deleted
replicationcontroller "myweb" deleted
service "myweb" deleted
--------------------------------------------------------------------
新建完成后,进行检查pod状态,如果还是ContainerCreating状态,方案三一定可以解决
方案三:
--------------------------------------------------------------------
[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
[root@localhost ~]# 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
[root@localhost ~]# docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
--------------------------------------------------------------------
到这里就算结束了,这三种方案一定会解决【open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory】证书的问题。
-
Kubernetes
110 引用 • 54 回帖 • 3 关注
Kubernetes 是 Google 开源的一个容器编排引擎,它支持自动化部署、大规模可伸缩、应用容器化管理。
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于