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.