Can someone please help
I’m getting the following error when I run ‘kubeadm init’
[init] Using Kubernetes version: v1.25.0
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.25.0: output: E0901 16:50:43.675142 4165 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-apiserver:v1.25.0": failed to resolve reference "registry.k8s.io/kube-apiserver:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-apiserver:v1.25.0"
time="2022-09-01T16:50:43-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-apiserver:v1.25.0": failed to resolve reference "registry.k8s.io/kube-apiserver:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.0: output: E0901 16:53:14.264007 4564 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-controller-manager:v1.25.0": failed to resolve reference "registry.k8s.io/kube-controller-manager:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-controller-manager:v1.25.0"
time="2022-09-01T16:53:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-controller-manager:v1.25.0": failed to resolve reference "registry.k8s.io/kube-controller-manager:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.0: output: E0901 16:55:44.364804 4922 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-scheduler:v1.25.0": failed to resolve reference "registry.k8s.io/kube-scheduler:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-scheduler/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-scheduler:v1.25.0"
time="2022-09-01T16:55:44-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-scheduler:v1.25.0": failed to resolve reference "registry.k8s.io/kube-scheduler:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-scheduler/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.0: output: E0901 16:58:14.769855 5295 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-proxy:v1.25.0": failed to resolve reference "registry.k8s.io/kube-proxy:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-proxy/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-proxy:v1.25.0"
time="2022-09-01T16:58:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/kube-proxy:v1.25.0": failed to resolve reference "registry.k8s.io/kube-proxy:v1.25.0": failed to do request: Head https://registry.k8s.io/v2/kube-proxy/manifests/v1.25.0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.4-0: output: E0901 17:03:14.966455 6024 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/etcd:3.5.4-0": failed to resolve reference "registry.k8s.io/etcd:3.5.4-0": failed to do request: Head https://registry.k8s.io/v2/etcd/manifests/3.5.4-0: dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/etcd:3.5.4-0"
time="2022-09-01T17:03:14-06:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "registry.k8s.io/etcd:3.5.4-0": failed to resolve reference "registry.k8s.io/etcd:3.5.4-0": failed to do request: Head https://registry.k8s.io/v2/etcd/manifests/3.5.4-0: dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
I’m unable to initialize control-plane, made sure that docker is running.
kubectl, kubeadm is also working.
Does it look like issue on the K8 side, or did I do anything wrong.
2
Answers
As per output ,it does look like some connectivity issue due to following line , probably slow or no connectivity
can you check the connectivity to image registry with following
You should get the response from server ,If you donot get the response back ,need to troubleshoot for network connectivity
PING registry.k8s.io(2600:1901:0:1013:: (2600:1901:0:1013::)) 56 data bytes
64 bytes from 2600:1901:0:1013:: (2600:1901:0:1013::): icmp_seq=1 ttl=56 time=69.1 ms
64 bytes from 2600:1901:0:1013:: (2600:1901:0:1013::): icmp_seq=2 ttl=56 time=83.9 ms
64 bytes from 2600:1901:0:1013:: (2600:1901:0:1013::): icmp_seq=3 ttl=56 time=83.4 ms
Look at the error message
The images are not getting pulled and hence the ImagePull error is thrown.
You should have internet connectivity from the machine where the initialize command was run.