Kubernetes Create pod always in containercreating troubleshoot and resolve

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.