After creating the pod with k8s, I found that I could not access the demo application, checked the pods status, and found all in the Containercreationg state.
Baidu a bit, according to the method on the Internet, check the MYSQL-JN6F2 this pods details
The most important of these issues are: details: (open/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt:no such file or directory)
Solution:
viewing/ETC/DOCKER/CERTS.D/REGISTRY.ACCESS.REDHAT.COM/REDHAT-CA.CRT (which is the description in the link) is a soft link, but there is no real/etc/rhsm after the link has passed. So you need to use Yum to install:
Yum Install *rhsm*
Once the installation is complete, perform the Docker pull Registry.access.redhat.com/rhel7/pod-infrastructure:latest
If you still have an error, refer to the following scenario:
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
These two commands generate the/etc/rhsm/ca/redhat-uep.pem file.
The following results will be obtained if the result is smooth.
[Email protected]]# Docker Pull Registry.access.redhat.com/rhel7/pod-infrastructure:latest
Trying to Repository Registry.access.redhat.com/rhel7/pod-infrastructure ...
Latest:pulling from Registry.access.redhat.com/rhel7/pod-infrastructure
26e5ed6899db:pull Complete
66dbe984a319:pull Complete
9138e7863e08:pull Complete
digest:sha256:92d43c37297da3ab187fc2b9e9ebfb243c1110d446c783ae1b989088495db931
status:downloaded newer image for Registry.access.redhat.com/rhel7/pod-infrastructure:latest
Delete the previously created RC
[Email protected]/]# Kubectl delete-f Mysql-rc.yaml
Re-create
[Email protected]/]# Kubectl create-f Mysql-rc.yaml
Replicationcontroller "MySQL" Created
View status again
[[email protected]/]# kubectl get pod
NAME Ready STATUS Restarts
mysql-b8m2q 1/1 Running 0 27m
Everything is fine.
Follow the public number "kick genius" for more graphics, video tutorials
Kubernetes Create pod always in containercreating troubleshoot and resolve