4

I am running Kubernetes on CentOS 7, and I am unable to deploy pods.  After running

# kubectl run nginx --image=nginx

I run

# kubectl describe pod nginx

which gives the following output:

Name:           nginx-701339712-8sx7m
Namespace:      default
Node:           node2/192.168.1.126
Start Time:     Fri, 27 Oct 2017 14:06:35 -0400
Labels:         pod-template-hash=701339712
                run=nginx
Status:         Pending
IP:
Controllers:    ReplicaSet/nginx-701339712
Containers:
  nginx:
    Container ID:
    Image:                      nginx
    Image ID:
    Port:
    State:                      Waiting
      Reason:                   ContainerCreating
    Ready:                      False
    Restart Count:              0
    Volume Mounts:              <none>
    Environment Variables:      <none>
Conditions:
  Type          Status
  Initialized   True
  Ready         False
  PodScheduled  True
No volumes.
QoS Class:      BestEffort
Tolerations:    <none>
Events:
  FirstSeen     LastSeen        Count   From                    SubObjectPath   Type            Reason          Message
  ---------     --------        -----   ----                    -------------   --------        ------          -------
  21s           21s             1       {default-scheduler }                    Normal          Scheduled       Successfully assigned nginx-701339712-8sx7m to node2
  21s           7s              2       {kubelet node2}                         Warning         FailedSync      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)"

If you scroll the last line, you’ll see that it’s going to redhat.com and failing.  I don’t know why it’s going to the RedHat repo for image pull; it should pull from docker hub.

0

2 Answers 2

1

I solved it commenting the line :

KUBELET_POD_INFRA_CONTAINER="--pod-infra-containerimage=registry.access.redhat.com/rhel7/pod-infrastructure:latest"

in /etc/kubernetes/kubelet

on each of my slaves

1

not recommand edit /etc/kubernetes/kubelet to solve this error. if you see image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, you can try run command:

yum install -y rhsm

I solved the same error after run the command.

2
  • is it a redhat repository? Nov 30, 2017 at 6:31
  • This doesn't work when you're using centos. I had to run "yum install subscription-manager". That appeared to work.
    – Matthew
    Jan 17, 2018 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .