0

I am getting ImagePullBackOff error when I pull images from docker fro kubernates pods. I am using Fedora32 and running a minikube on docker.

'''

[prem@localhost simplek8s]$ **docker ps --all**
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS                    PORTS                                                                                                      NAMES
070fba4347b7        **gcr.io/k8s-minikube/kicbase:v0.0.13**   "/usr/local/bin/entr…"   3 days ago          Up About an hour          127.0.0.1:32771->22/tcp, 127.0.0.1:32770->2376/tcp, 127.0.0.1:32769->5000/tcp, 127.0.0.1:32768->8443/tcp   minikube
85a476d91b28        hello-world                           "/hello"                 3 days ago          Exited (0) 3 days ago                                                                                                                musing_fermat
dbf5151bc72e        frontend_tests                        "docker-entrypoint.s…"   6 days ago          Exited (137) 3 days ago                                                                                                              frontend_tests_1
e47486560719        frontend_web                          "docker-entrypoint.s…"   6 days ago          Exited (137) 3 days ago                                                                                                              frontend_web_1
75933fdf45c4        274c1d9065e6                          "/bin/sh -c 'npm ins…"   6 days ago          Created                                                                                                                              romantic_sinoussi
ab0d87295579        274c1d9065e6                          "/bin/sh -c 'npm ins…"   6 days ago          Created  

'''

In the above containers you can see minikube running.

This is what is showing when I see the pods.

[prem@localhost simplek8s]$ **kubectl get pods**
NAME         READY   STATUS             RESTARTS   AGE
busybox      0/1     ImagePullBackOff   0          47h
client-pod   0/1     ImagePullBackOff   0          2d
dnsutils     0/1     ImagePullBackOff   0          21m
nginx        0/1     ImagePullBackOff   0          47h

[prem@localhost simplek8s]$ **kubectl describe pods**
Name:         busybox
Namespace:    default
Priority:     0
Node:         minikube/192.168.49.2
Start Time:   Wed, 28 Oct 2020 02:05:29 +0530
Labels:       run=busybox
Annotations:  <none>
Status:       Pending
IP:           172.17.0.2
IPs:
  IP:  172.17.0.2
Containers:
  busybox:
    Container ID:   
    Image:          busybox
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-zr7nz (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  default-token-zr7nz:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-zr7nz
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
**Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute** op=Exists for 300s
Events:
  Type     Reason   Age                    From     Message
  ----     ------   ----                   ----     -------
  Normal   Pulling  60m (x4 over 63m)      kubelet  Pulling image "busybox"
  Warning  Failed   60m                    **kubelet  Failed to pull image "busybox": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.49.1:53: read udp 192.168.49.2:38852->192.168.49.1:53: i/o timeout**
  Warning  Failed   13m (x13 over 62m)     kubelet  Error: ErrImagePull
  Warning  Failed   8m17s (x226 over 62m)  kubelet  Error: ImagePullBackOff
  Normal   BackOff  3m12s (x246 over 62m)  kubelet  Back-off pulling image "busybox"

[myname@localhost simplek8s]$ **minikube ssh**
docker@minikube:~$ cat /etc/resolv.conf
nameserver 192.168.49.1
options ndots:0
docker@minikube:~$ **curl google.com**
curl: (6) **Could not resolve host: google.com**

Clearly the pods are not able to access the internet to pull images. looks like I am missing some dns config to make the minikube pull images from internet.Help me resolve this.

1 Answers1

0

Due to the changes in Fedora 32, the install experience is slightly more involved than usual, and currently requires some extra manual steps to be performed, depending on your machine's configuration.

See: docker-for-linux-fedora32.

Take a look also on: cannot-pull-image, could-not-resolve-host, curl-6-could-not-resolve-host, err-docker-daemon.

Remember that the current state of Docker on Fedora 32 is not ideal. The lack of an official package might bother some, and there is an issue upstream where this is discussed. See: docker-fedora32-example.

Take a look on this installation Docker on Fedora32 - docker-on-fedora32.

To install Docker Engine, you need the 64-bit version of one of these Fedora versions:

  • Fedora 30
  • Fedora 31

I advice you to use different drivers, example kvm or virtualbox - minikube-drivers. Look at this guide - minikube-kubernetes.

Malgorzata
  • 6,409
  • 1
  • 10
  • 27
  • Thanks a lot for the answer.. Yes, true that fedora 32 is giving me lot of pain. Can you tell me which can be the ideal version of centos desktop OS to use docker and kubernates? I am even ready to clean up the whole OS to have a stable bug free environment. In few websites they suggest me to use HTTP_PROXY.. Like this https://docs.docker.com/network/proxy/ I am not sure what is the PROXY IP I will have to use. – PremStephenIrudayaraj Oct 30 '20 at 14:06
  • Hi, nice to hear that it helped. You can upvote and accept my answer to be more visible for future community. I advice you to create another post where you will ask about ideal version of centos desktop OS to use docker and kubernetes - it is compliant with the Stackoverflow's policy. You can paste link here and I ll take a look. – Malgorzata Nov 02 '20 at 12:35