<p>I am trying to set-up kubernetes in an offline server. Part of the installation requires the following docker images, which I have already loaded in the offline server:</p>
<pre><code># docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
k8s.gcr.io/kube-apiserver            v1.24.1             e9f4b425f919        2 weeks ago         130MB
k8s.gcr.io/kube-proxy                v1.24.1             beb86f5d8e6c        2 weeks ago         110MB
k8s.gcr.io/kube-controller-manager   v1.24.1             b4ea7e648530        2 weeks ago         119MB
k8s.gcr.io/kube-scheduler            v1.24.1             18688a72645c        2 weeks ago         51MB
k8s.gcr.io/etcd                      3.5.3-0             aebe758cef4c        7 weeks ago         299MB
k8s.gcr.io/pause                     3.7                 221177c6082a        2 months ago        711kB
k8s.gcr.io/coredns/coredns           v1.8.6              a4ca41631cc7        8 months ago        46.8MB
artapp/postgres-gis                  12.2-3.0            7a725ccc8c00        2 years ago         490MB
k8s.gcr.io/pause                     3.2                 80d28bedfe5d        2 years ago         683kB
</code></pre>
<p>When executing:</p>
<pre><code># kubeadm init --kubernetes-version=v1.24.1
</code></pre>
<p>I receive the following errors for the docker images already present in the server:</p>
<pre><code>error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.24.1: output: E0608 16:19:45.765750   15434 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-apiserver:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-apiserver:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-apiserver/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:59511-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/kube-apiserver:v1.24.1&quot;
time=&quot;2022-06-08T16:19:45+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-apiserver:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-apiserver:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-apiserver/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:59511-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.24.1: output: E0608 16:19:45.845992   15494 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-controller-manager:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-controller-manager:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-controller-manager/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:47619-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/kube-controller-manager:v1.24.1&quot;
time=&quot;2022-06-08T16:19:45+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-controller-manager:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-controller-manager:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-controller-manager/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:47619-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-scheduler:v1.24.1: output: E0608 16:19:45.923773   15554 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-scheduler:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-scheduler:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-scheduler/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34120-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/kube-scheduler:v1.24.1&quot;
time=&quot;2022-06-08T16:19:45+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-scheduler:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-scheduler:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-scheduler/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34120-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-proxy:v1.24.1: output: E0608 16:19:46.002857   15614 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-proxy:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-proxy:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-proxy/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:50287-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/kube-proxy:v1.24.1&quot;
time=&quot;2022-06-08T16:19:46+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/kube-proxy:v1.24.1\&quot;: failed to resolve reference \&quot;k8s.gcr.io/kube-proxy:v1.24.1\&quot;: failed to do request: Head https://k8s.gcr.io/v2/kube-proxy/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:50287-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/pause:3.7: output: E0608 16:19:46.083042   15674 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/pause:3.7\&quot;: failed to resolve reference \&quot;k8s.gcr.io/pause:3.7\&quot;: failed to do request: Head https://k8s.gcr.io/v2/pause/manifests/3.7: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34335-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/pause:3.7&quot;
time=&quot;2022-06-08T16:19:46+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/pause:3.7\&quot;: failed to resolve reference \&quot;k8s.gcr.io/pause:3.7\&quot;: failed to do request: Head https://k8s.gcr.io/v2/pause/manifests/3.7: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34335-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/etcd:3.5.3-0: output: E0608 16:19:46.161935   15732 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/etcd:3.5.3-0\&quot;: failed to resolve reference \&quot;k8s.gcr.io/etcd:3.5.3-0\&quot;: failed to do request: Head https://k8s.gcr.io/v2/etcd/manifests/3.5.3-0: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:57672-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/etcd:3.5.3-0&quot;
time=&quot;2022-06-08T16:19:46+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/etcd:3.5.3-0\&quot;: failed to resolve reference \&quot;k8s.gcr.io/etcd:3.5.3-0\&quot;: failed to do request: Head https://k8s.gcr.io/v2/etcd/manifests/3.5.3-0: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:57672-&gt;[::1]:53: read: connection refused&quot;
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/coredns/coredns:v1.8.6: output: E0608 16:19:46.240705   15791 remote_image.go:218] &quot;PullImage from image service failed&quot; err=&quot;rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/coredns/coredns:v1.8.6\&quot;: failed to resolve reference \&quot;k8s.gcr.io/coredns/coredns:v1.8.6\&quot;: failed to do request: Head https://k8s.gcr.io/v2/coredns/coredns/manifests/v1.8.6: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:37761-&gt;[::1]:53: read: connection refused&quot; image=&quot;k8s.gcr.io/coredns/coredns:v1.8.6&quot;
time=&quot;2022-06-08T16:19:46+03:00&quot; level=fatal msg=&quot;pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \&quot;k8s.gcr.io/coredns/coredns:v1.8.6\&quot;: failed to resolve reference \&quot;k8s.gcr.io/coredns/coredns:v1.8.6\&quot;: failed to do request: Head https://k8s.gcr.io/v2/coredns/coredns/manifests/v1.8.6: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:37761-&gt;[::1]:53: read: connection refused&quot;
</code></pre>
<p>When trying to pull these images I receive a similar error:</p>
<pre><code># docker pull k8s.gcr.io/etcd:3.5.3-0
Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:33012-&gt;[::1]:53: read: connection refused
</code></pre>
<p>Is this supposed to happen? Is there a way to configure docker to check if the image is already present?</p>

CC BY-SA 4.0
2022-06-08T14:12:00.563Z
Where did you configure kubeadm to talk to docker? What CRI are you using?
BMitch
CC BY-SA 4.0
2022-06-08T14:23:02.323Z
@BMitch I have not applied any manual configuration, so I guess that the default CRI is used. ```ctr image pull k8s.gcr.io/etcd:3.5.3-0``` also fails with a similar error.
Panagiotis
<docker><kubernetes>
Should docker pull fail in an offline server when the specified image is already pulled?
Panagiotis
# Should docker pull fail in an offline server when the specified image is already pulled?

(Asked by: username_0 on 2022-06-08)

I am trying to set-up kubernetes in an offline server. Part of the installation requires the following docker images, which I have already loaded in the offline server:
# docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             SIZE
k8s.gcr.io/kube-apiserver            v1.24.1             e9f4b425f919        2 weeks ago         130MB
k8s.gcr.io/kube-proxy                v1.24.1             beb86f5d8e6c        2 weeks ago         110MB
k8s.gcr.io/kube-controller-manager   v1.24.1             b4ea7e648530        2 weeks ago         119MB
k8s.gcr.io/kube-scheduler            v1.24.1             18688a72645c        2 weeks ago         51MB
k8s.gcr.io/etcd                      3.5.3-0             aebe758cef4c        7 weeks ago         299MB
k8s.gcr.io/pause                     3.7                 221177c6082a        2 months ago        711kB
k8s.gcr.io/coredns/coredns           v1.8.6              a4ca41631cc7        8 months ago        46.8MB
artapp/postgres-gis                  12.2-3.0            7a725ccc8c00        2 years ago         490MB
k8s.gcr.io/pause                     3.2                 80d28bedfe5d        2 years ago         683kB

When executing:
# kubeadm init --kubernetes-version=v1.24.1

I receive the following errors for the docker images already present in the server:
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.24.1: output: E0608 16:19:45.765750   15434 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-apiserver:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-apiserver:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-apiserver/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:59511->[::1]:53: read: connection refused" image="k8s.gcr.io/kube-apiserver:v1.24.1"
time="2022-06-08T16:19:45+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-apiserver:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-apiserver:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-apiserver/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:59511->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.24.1: output: E0608 16:19:45.845992   15494 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-controller-manager:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-controller-manager:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-controller-manager/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:47619->[::1]:53: read: connection refused" image="k8s.gcr.io/kube-controller-manager:v1.24.1"
time="2022-06-08T16:19:45+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-controller-manager:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-controller-manager:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-controller-manager/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:47619->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-scheduler:v1.24.1: output: E0608 16:19:45.923773   15554 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-scheduler:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-scheduler:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-scheduler/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34120->[::1]:53: read: connection refused" image="k8s.gcr.io/kube-scheduler:v1.24.1"
time="2022-06-08T16:19:45+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-scheduler:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-scheduler:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-scheduler/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34120->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-proxy:v1.24.1: output: E0608 16:19:46.002857   15614 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-proxy:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-proxy:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-proxy/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:50287->[::1]:53: read: connection refused" image="k8s.gcr.io/kube-proxy:v1.24.1"
time="2022-06-08T16:19:46+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/kube-proxy:v1.24.1\": failed to resolve reference \"k8s.gcr.io/kube-proxy:v1.24.1\": failed to do request: Head https://k8s.gcr.io/v2/kube-proxy/manifests/v1.24.1: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:50287->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/pause:3.7: output: E0608 16:19:46.083042   15674 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/pause:3.7\": failed to resolve reference \"k8s.gcr.io/pause:3.7\": failed to do request: Head https://k8s.gcr.io/v2/pause/manifests/3.7: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34335->[::1]:53: read: connection refused" image="k8s.gcr.io/pause:3.7"
time="2022-06-08T16:19:46+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/pause:3.7\": failed to resolve reference \"k8s.gcr.io/pause:3.7\": failed to do request: Head https://k8s.gcr.io/v2/pause/manifests/3.7: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:34335->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/etcd:3.5.3-0: output: E0608 16:19:46.161935   15732 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/etcd:3.5.3-0\": failed to resolve reference \"k8s.gcr.io/etcd:3.5.3-0\": failed to do request: Head https://k8s.gcr.io/v2/etcd/manifests/3.5.3-0: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:57672->[::1]:53: read: connection refused" image="k8s.gcr.io/etcd:3.5.3-0"
time="2022-06-08T16:19:46+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/etcd:3.5.3-0\": failed to resolve reference \"k8s.gcr.io/etcd:3.5.3-0\": failed to do request: Head https://k8s.gcr.io/v2/etcd/manifests/3.5.3-0: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:57672->[::1]:53: read: connection refused"
, error: exit status 1
    [ERROR ImagePull]: failed to pull image k8s.gcr.io/coredns/coredns:v1.8.6: output: E0608 16:19:46.240705   15791 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/coredns/coredns:v1.8.6\": failed to resolve reference \"k8s.gcr.io/coredns/coredns:v1.8.6\": failed to do request: Head https://k8s.gcr.io/v2/coredns/coredns/manifests/v1.8.6: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:37761->[::1]:53: read: connection refused" image="k8s.gcr.io/coredns/coredns:v1.8.6"
time="2022-06-08T16:19:46+03:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"k8s.gcr.io/coredns/coredns:v1.8.6\": failed to resolve reference \"k8s.gcr.io/coredns/coredns:v1.8.6\": failed to do request: Head https://k8s.gcr.io/v2/coredns/coredns/manifests/v1.8.6: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:37761->[::1]:53: read: connection refused"

When trying to pull these images I receive a similar error:
# docker pull k8s.gcr.io/etcd:3.5.3-0
Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp: lookup k8s.gcr.io on [::1]:53: read udp [::1]:33012->[::1]:53: read: connection refused

Is this supposed to happen? Is there a way to configure docker to check if the image is already present?

**Tags:** docker, kubernetes

> **Comments:**
> **username_1**: Where did you configure kubeadm to talk to docker? What CRI are you using?  
> **username_0**: @username_1 I have not applied any manual configuration, so I guess that the default CRI is used. ```ctr image pull k8s.gcr.io/etcd:3.5.3-0``` also fails with a similar error.  

---

## 0 answers

