1

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?

2
  • Where did you configure kubeadm to talk to docker? What CRI are you using?
    – BMitch
    Jun 8 at 14:12
  • @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
    Jun 8 at 14:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.