i/o timeout ImagePullBackOff issue on minikube docker image for pod on fedora32

  docker, fedora, minikube

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


[[email protected] 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>22/tcp,>2376/tcp,>5000/tcp,>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.

[[email protected] 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

[[email protected] simplek8s]$ **kubectl describe pods**
Name:         busybox
Namespace:    default
Priority:     0
Node:         minikube/
Start Time:   Wed, 28 Oct 2020 02:05:29 +0530
Labels:       run=busybox
Annotations:  <none>
Status:       Pending
    Container ID:   
    Image:          busybox
    Image ID:       
    Port:           <none>
    Host Port:      <none>
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    <none>
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-zr7nz (ro)
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
    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
  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 read udp> 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"

[[email protected] simplek8s]$ **minikube ssh**
[email protected]:~$ cat /etc/resolv.conf
options ndots:0
[email protected]:~$ **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.

Source: Docker Questions