# ErrImagePull in kubectl while pulling image

**URL:** <https://discuss.kubernetes.io/t/errimagepull-in-kubectl-while-pulling-image/28063>\
**Category:** General Discussions\
**Created:** [April 29, 2024, 8:39am UTC](https://discuss.kubernetes.io/t/errimagepull-in-kubectl-while-pulling-image/28063 "2024-04-29T08:39:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivasan\_T](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/srinivasan_t/32/14864_2.png) [@Srinivasan\_T](https://discuss.kubernetes.io/u/Srinivasan_T)\
**Post date:** [April 29, 2024, 8:39am UTC](https://discuss.kubernetes.io/t/errimagepull-in-kubectl-while-pulling-image/28063/1 "2024-04-29T08:39:44Z")

</div>

### Cluster information:

Kubernetes version: v1.30.0  
Cloud being used: bare-metal  
Installation method: minikube  
Host OS: Ubuntu 18.04.4 LTS  
CNI and version: NA  
CRI and version: NA

I’m trying out kubernetes using minikube. When I try to do a deployment, I’m getting the below error,

Type Reason Age From Message

* * *

Normal Scheduled 31s default-scheduler Successfully assigned default/nginx-deployment-7745d7cf5c-v7d68 to minikube  
Normal Pulling 29s kubelet Pulling image “nginx”  
Warning Failed 14s kubelet Failed to pull image “nginx”: Error response from daemon: Get “[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/)”: dial tcp 54.236.113.205:443: i/o timeout  
Warning Failed 14s kubelet Error: ErrImagePull  
Normal BackOff 14s kubelet Back-off pulling image “nginx”  
Warning Failed 14s kubelet Error: ImagePullBackOff

However, docker pull works fine and able to pull the images,

root@pf04:~# docker image ls  
REPOSITORY TAG IMAGE ID CREATED SIZE  
nginx latest 7383c266ef25 5 days ago 188MB  
[gcr.io/k8s-minikube/kicbase](http://gcr.io/k8s-minikube/kicbase) v0.0.43 619d67e74933 10 days ago 1.26GB  
hello-world latest d2c94e258dcb 12 months ago 13.3kB  
nginx 1.14.2 295c7be07902 5 years ago 109MB

I even tried setting the imagePullPolicy to IfNotPresent in my deployment file. But it still tries to pull the image and fails with the same error.

I tried setting the public DNS 8.8.8.8 in /etc/resolv.conf but still no use.

ping to [registry-1.docker.io](http://registry-1.docker.io) resolves to IP and no response. nslookup to [registry-1.docker.io](http://registry-1.docker.io) works.

Regards,  
Srini

---

<div class="post-metadata">

**Author:** ![sathish6432](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sathish6432](https://discuss.kubernetes.io/u/sathish6432)\
**Post date:** [April 30, 2024, 10:09am UTC](https://discuss.kubernetes.io/t/errimagepull-in-kubectl-while-pulling-image/28063/2 "2024-04-30T10:09:13Z")

</div>

The error message “Failed to pull image “nginx”: Error response from daemon: Get “[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/)”: dial tcp 54.236.113.205:443: i/o timeout” indicates that the Kubernetes cluster is unable to connect to the Docker Hub registry ([registry-1.docker.io](http://registry-1.docker.io)) to pull the nginx image.  
So try to ping the registry IP ([docker.io](http://docker.io)) or local registry where you kept your image so that you can find out if the communication is available or not. I had a similar issue, so I tried pulling only the image from the Docker Hub as a test, and checked if the image is accessible or not. So, try it out, you should be able to pull the image from the registry. Also, try removing the nginx image and then try again.

---

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [April 30, 2024, 10:33am UTC](https://discuss.kubernetes.io/t/errimagepull-in-kubectl-while-pulling-image/28063/3 "2024-04-30T10:33:56Z")

</div>


