Asking for help? Comment out what you need so we can get more information to help you!
Cluster information:
Kubernetes version: v1.27.0
Cloud being used: (put bare-metal if not on a public cloud)
Installation method: apt-get install -y kubelet kubeadm kubectl
Host OS: ubuntu 20.04
CNI and version:
CRI and version:
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.
sudo kubeadm init --cri-socket unix:///run/containerd/containerd.sock --kubernetes-version v1.27.0 --image-repository registry.aliyuncs.com/google_containers --pod-network-cidr 10.244.0.0/16 --v=5
I0822 08:48:50.619627 29895 interface.go:432] Looking for default routes with IPv4 addresses
I0822 08:48:50.619652 29895 interface.go:437] Default route transits interface "enp5s0"
I0822 08:48:50.619806 29895 interface.go:209] Interface enp5s0 is up
I0822 08:48:50.619843 29895 interface.go:257] Interface "enp5s0" has 2 addresses :[10.61.40.201/24 fe80::5281:40ff:fe29:f7eb/64].
I0822 08:48:50.619855 29895 interface.go:224] Checking addr 10.61.40.201/24.
I0822 08:48:50.619860 29895 interface.go:231] IP found 10.61.40.201
I0822 08:48:50.619875 29895 interface.go:263] Found valid IPv4 address 10.61.40.201 for interface "enp5s0".
I0822 08:48:50.619878 29895 interface.go:443] Found active IP 10.61.40.201
I0822 08:48:50.619895 29895 kubelet.go:196] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
[init] Using Kubernetes version: v1.27.0
[preflight] Running pre-flight checks
I0822 08:48:50.625188 29895 checks.go:563] validating Kubernetes and kubeadm version
I0822 08:48:50.625234 29895 checks.go:168] validating if the firewall is enabled and active
I0822 08:48:50.637325 29895 checks.go:203] validating availability of port 6443
I0822 08:48:50.637492 29895 checks.go:203] validating availability of port 10259
I0822 08:48:50.637516 29895 checks.go:203] validating availability of port 10257
I0822 08:48:50.637533 29895 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-apiserver.yaml
I0822 08:48:50.637545 29895 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-controller-manager.yaml
I0822 08:48:50.637558 29895 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-scheduler.yaml
I0822 08:48:50.637565 29895 checks.go:280] validating the existence of file /etc/kubernetes/manifests/etcd.yaml
I0822 08:48:50.637572 29895 checks.go:430] validating if the connectivity type is via proxy or direct
[WARNING HTTPProxy]: Connection to "https://10.61.40.201" uses proxy "http://10.61.40.54:7890". If that is not intended, adjust your proxy settings
I0822 08:48:50.637642 29895 checks.go:469] validating http connectivity to first IP address in the CIDR
I0822 08:48:50.637656 29895 checks.go:469] validating http connectivity to first IP address in the CIDR
I0822 08:48:50.637663 29895 checks.go:104] validating the container runtime
I0822 08:48:50.652755 29895 checks.go:639] validating whether swap is enabled or not
I0822 08:48:50.652792 29895 checks.go:370] validating the presence of executable crictl
I0822 08:48:50.652810 29895 checks.go:370] validating the presence of executable conntrack
I0822 08:48:50.652823 29895 checks.go:370] validating the presence of executable ip
I0822 08:48:50.652832 29895 checks.go:370] validating the presence of executable iptables
I0822 08:48:50.652843 29895 checks.go:370] validating the presence of executable mount
I0822 08:48:50.652851 29895 checks.go:370] validating the presence of executable nsenter
I0822 08:48:50.652859 29895 checks.go:370] validating the presence of executable ebtables
I0822 08:48:50.652867 29895 checks.go:370] validating the presence of executable ethtool
I0822 08:48:50.652875 29895 checks.go:370] validating the presence of executable socat
I0822 08:48:50.652888 29895 checks.go:370] validating the presence of executable tc
I0822 08:48:50.652894 29895 checks.go:370] validating the presence of executable touch
I0822 08:48:50.652905 29895 checks.go:516] running all checks
I0822 08:48:50.660454 29895 checks.go:401] checking whether the given node name is valid and reachable using net.LookupHost
I0822 08:48:50.660593 29895 checks.go:605] validating kubelet version
I0822 08:48:50.687672 29895 checks.go:130] validating if the "kubelet" service is enabled and active
I0822 08:48:50.695495 29895 checks.go:203] validating availability of port 10250
I0822 08:48:50.695557 29895 checks.go:329] validating the contents of file /proc/sys/net/bridge/bridge-nf-call-iptables
I0822 08:48:50.695606 29895 checks.go:329] validating the contents of file /proc/sys/net/ipv4/ip_forward
I0822 08:48:50.695624 29895 checks.go:203] validating availability of port 2379
I0822 08:48:50.695642 29895 checks.go:203] validating availability of port 2380
I0822 08:48:50.695657 29895 checks.go:243] validating the existence and emptiness of directory /var/lib/etcd
[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'
W0822 08:48:50.695744 29895 images.go:80] could not find officially supported version of etcd for Kubernetes v1.27.0, falling back to the nearest etcd version (3.5.7-0)
I0822 08:48:50.695754 29895 checks.go:828] using image pull policy: IfNotPresent
I0822 08:48:50.712846 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0
I0822 08:48:50.852061 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0
I0822 08:48:50.991677 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0
I0822 08:48:51.121888 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0
W0822 08:48:51.254222 29895 checks.go:835] detected that the sandbox image "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.8" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.aliyuncs.com/google_containers/pause:3.9" as the CRI sandbox image.
I0822 08:48:51.267350 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/pause:3.9
I0822 08:48:51.395377 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/etcd:3.5.7-0
I0822 08:48:51.522758 29895 checks.go:854] pulling: registry.aliyuncs.com/google_containers/coredns:v1.10.1
[preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0: output: E0822 08:48:50.832197 30055 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-apiserver/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0"
time="2024-08-22T08:48:50Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-apiserver:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-apiserver/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0: output: E0822 08:48:50.971665 30156 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-controller-manager/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0"
time="2024-08-22T08:48:50Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-controller-manager:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-controller-manager/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0: output: E0822 08:48:51.101540 30258 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-scheduler/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0"
time="2024-08-22T08:48:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-scheduler:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-scheduler/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0: output: E0822 08:48:51.235617 30360 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-proxy/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0"
time="2024-08-22T08:48:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/kube-proxy:v1.27.0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/kube-proxy/manifests/v1.27.0\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/pause:3.9: output: E0822 08:48:51.376843 30481 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/pause:3.9\": failed to resolve reference \"registry.aliyuncs.com/google_containers/pause:3.9\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/pause/manifests/3.9\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/pause:3.9"
time="2024-08-22T08:48:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/pause:3.9\": failed to resolve reference \"registry.aliyuncs.com/google_containers/pause:3.9\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/pause/manifests/3.9\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/etcd:3.5.7-0: output: E0822 08:48:51.499356 30586 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/etcd:3.5.7-0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/etcd:3.5.7-0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/etcd/manifests/3.5.7-0\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/etcd:3.5.7-0"
time="2024-08-22T08:48:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/etcd:3.5.7-0\": failed to resolve reference \"registry.aliyuncs.com/google_containers/etcd:3.5.7-0\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/etcd/manifests/3.5.7-0\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.10.1: output: E0822 08:48:51.640488 30689 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/coredns:v1.10.1\": failed to resolve reference \"registry.aliyuncs.com/google_containers/coredns:v1.10.1\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/coredns/manifests/v1.10.1\": dial tcp 120.55.105.209:443: connect: connection refused" image="registry.aliyuncs.com/google_containers/coredns:v1.10.1"
time="2024-08-22T08:48:51Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.aliyuncs.com/google_containers/coredns:v1.10.1\": failed to resolve reference \"registry.aliyuncs.com/google_containers/coredns:v1.10.1\": failed to do request: Head \"https://registry.aliyuncs.com/v2/google_containers/coredns/manifests/v1.10.1\": dial tcp 120.55.105.209:443: connect: connection refused"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
error execution phase preflight
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
cmd/kubeadm/app/cmd/phases/workflow/runner.go:260
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll
cmd/kubeadm/app/cmd/phases/workflow/runner.go:446
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run
cmd/kubeadm/app/cmd/phases/workflow/runner.go:232
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdInit.func1
cmd/kubeadm/app/cmd/init.go:111
github.com/spf13/cobra.(*Command).execute
vendor/github.com/spf13/cobra/command.go:916
github.com/spf13/cobra.(*Command).ExecuteC
vendor/github.com/spf13/cobra/command.go:1040
github.com/spf13/cobra.(*Command).Execute
vendor/github.com/spf13/cobra/command.go:968
k8s.io/kubernetes/cmd/kubeadm/app.Run
cmd/kubeadm/app/kubeadm.go:50
main.main
cmd/kubeadm/kubeadm.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1598
The system has proxy configured:
export http_proxy="http://10.61.40.54:7890
export https_proxy=“http://10.61.40.54:7890”
export no_proxy=“localhost,10.96.0.0/12,10.244.0.0/16”
and swap is off.
If I set the registry to the default k8s.io, the same as above. If I turn network proxy off, set mage-repository to “registry.aliyuncs.com/google_containers”, kubeadm init could success.
kubeadm config images list result:
kubeadm config images list
I0822 08:31:25.347952 22600 version.go:256] remote version is much newer: v1.31.0; falling back to: stable-1.27
W0822 08:31:26.149609 22600 images.go:80] could not find officially supported version of etcd for Kubernetes v1.27.16, falling back to the nearest etcd version (3.5.7-0)
registry.k8s.io/kube-apiserver:v1.27.16
registry.k8s.io/kube-controller-manager:v1.27.16
registry.k8s.io/kube-scheduler:v1.27.16
registry.k8s.io/kube-proxy:v1.27.16
registry.k8s.io/pause:3.9
registry.k8s.io/etcd:3.5.7-0
registry.k8s.io/coredns/coredns:v1.10.1
I have similar problem about kubeadm init failing on Debian (bookworm) v. 12 VM behind proxy and already configured in the .bashrc
The verbose logs are are as follows,
Is there a timeout value that needs to be configured?
sudo kubeadm init --control-plane-endpoint cka-cluster:6443 --pod-network-cidr 10.1.0.0/22 --v=5
I0822 18:35:59.088392 3655 initconfiguration.go:117] detected and using CRI socket: unix:///var/run/containerd/containerd.sock
I0822 18:35:59.090068 3655 interface.go:432] Looking for default routes with IPv4 addresses
I0822 18:35:59.090935 3655 interface.go:437] Default route transits interface "ens3"
I0822 18:35:59.091799 3655 interface.go:209] Interface ens3 is up
I0822 18:35:59.092490 3655 interface.go:257] Interface "ens3" has 2 addresses :[192.168.122.48/24 fe80::5054:ff:fe43:42cf/64].
I0822 18:35:59.093635 3655 interface.go:224] Checking addr 192.168.122.48/24.
I0822 18:35:59.094405 3655 interface.go:231] IP found 192.168.122.48
I0822 18:35:59.095066 3655 interface.go:263] Found valid IPv4 address 192.168.122.48 for interface "ens3".
I0822 18:35:59.095965 3655 interface.go:443] Found active IP 192.168.122.48
I0822 18:35:59.096003 3655 kubelet.go:196] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
I0822 18:35:59.103696 3655 version.go:187] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.txt
W0822 18:36:09.104266 3655 version.go:104] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable-1.txt": Get "https://dl.k8s.io/release/stable-1.txt": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
W0822 18:36:09.104379 3655 version.go:105] falling back to the local client version: v1.28.4
[init] Using Kubernetes version: v1.28.4
[preflight] Running pre-flight checks
I0822 18:36:09.115323 3655 checks.go:563] validating Kubernetes and kubeadm version
I0822 18:36:09.116562 3655 checks.go:168] validating if the firewall is enabled and active
I0822 18:36:09.132535 3655 checks.go:203] validating availability of port 6443
I0822 18:36:09.134090 3655 checks.go:203] validating availability of port 10259
I0822 18:36:09.135127 3655 checks.go:203] validating availability of port 10257
I0822 18:36:09.136136 3655 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-apiserver.yaml
I0822 18:36:09.136168 3655 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-controller-manager.yaml
I0822 18:36:09.137557 3655 checks.go:280] validating the existence of file /etc/kubernetes/manifests/kube-scheduler.yaml
I0822 18:36:09.140515 3655 checks.go:280] validating the existence of file /etc/kubernetes/manifests/etcd.yaml
I0822 18:36:09.140555 3655 checks.go:430] validating if the connectivity type is via proxy or direct
I0822 18:36:09.142754 3655 checks.go:469] validating http connectivity to first IP address in the CIDR
I0822 18:36:09.142785 3655 checks.go:469] validating http connectivity to first IP address in the CIDR
I0822 18:36:09.143703 3655 checks.go:104] validating the container runtime
I0822 18:36:09.176064 3655 checks.go:639] validating whether swap is enabled or not
I0822 18:36:09.176131 3655 checks.go:370] validating the presence of executable crictl
I0822 18:36:09.176188 3655 checks.go:370] validating the presence of executable conntrack
I0822 18:36:09.176234 3655 checks.go:370] validating the presence of executable ip
I0822 18:36:09.176263 3655 checks.go:370] validating the presence of executable iptables
I0822 18:36:09.176286 3655 checks.go:370] validating the presence of executable mount
I0822 18:36:09.176303 3655 checks.go:370] validating the presence of executable nsenter
I0822 18:36:09.176329 3655 checks.go:370] validating the presence of executable ebtables
I0822 18:36:09.176363 3655 checks.go:370] validating the presence of executable ethtool
I0822 18:36:09.176382 3655 checks.go:370] validating the presence of executable socat
I0822 18:36:09.176411 3655 checks.go:370] validating the presence of executable tc
I0822 18:36:09.176437 3655 checks.go:370] validating the presence of executable touch
I0822 18:36:09.176466 3655 checks.go:516] running all checks
I0822 18:36:09.192772 3655 checks.go:401] checking whether the given node name is valid and reachable using net.LookupHost
I0822 18:36:09.192821 3655 checks.go:605] validating kubelet version
I0822 18:36:09.273995 3655 checks.go:130] validating if the "kubelet" service is enabled and active
I0822 18:36:09.290025 3655 checks.go:203] validating availability of port 10250
I0822 18:36:09.290902 3655 checks.go:329] validating the contents of file /proc/sys/net/bridge/bridge-nf-call-iptables
I0822 18:36:09.290955 3655 checks.go:329] validating the contents of file /proc/sys/net/ipv4/ip_forward
I0822 18:36:09.290989 3655 checks.go:203] validating availability of port 2379
I0822 18:36:09.291031 3655 checks.go:203] validating availability of port 2380
I0822 18:36:09.291058 3655 checks.go:243] validating the existence and emptiness of directory /var/lib/etcd
[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'
I0822 18:36:09.291162 3655 checks.go:828] using image pull policy: IfNotPresent
I0822 18:36:09.309475 3655 checks.go:854] pulling: registry.k8s.io/kube-apiserver:v1.28.4
I0822 18:51:12.915229 3655 checks.go:854] pulling: registry.k8s.io/coredns/coredns:v1.10.1
[preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.28.4: output: E0822 18:38:39.479378 3701 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.28.4\": failed to do request: Head \"https://registry.k8s.io/v2/kube-apiserver/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/kube-apiserver:v1.28.4"
time="2024-08-22T18:38:39-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.28.4\": failed to do request: Head \"https://registry.k8s.io/v2/kube-apiserver/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.28.4: output: E0822 18:41:09.712510 3732 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.28.4\": failed to do request: Head \"https ://registry.k8s.io/v2/kube-controller-manager/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/kube-controller-manager:v1.28.4"
time="2024-08-22T18:41:09-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.28.4\": failed to do request: Head \"https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.28.4: output: E0822 18:43:42.126340 3759 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-scheduler:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-scheduler:v1.28.4\": failed to do request: Head \"https://registry.k8s.io/v2/kube-scheduler/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/kube-scheduler:v1.28.4"
time="2024-08-22T18:43:42-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/kube-scheduler:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-scheduler:v1.28.4\": failed to do request: Head \"https ://registry.k8s.io/v2/kube-scheduler/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.28.4: output: E0822 18:46:12.388724 3788 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-proxy:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-proxy:v1.28.4\": failed to do request: Head \"https ://registry.k8s.io/v2/kube-proxy/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/kube-proxy:v1.28.4"
time="2024-08-22T18:46:12-04:00" level=fatal msg="pulling image: failed to pull and unpack image \"registry.k8s.io/kube-proxy:v1.28.4\": failed to resolve reference \"registry.k8s.io/kube-proxy:v1.28.4\": failed to do request: Head \"https://registry.k8s.io/v2/kube-proxy/manifests/v1.28.4\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.9: output: E0822 18:48:42.642524 3821 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/pause:3.9\": failed to resolve reference \"registry.k8s.io/pause:3.9\": failed to do request: Head \"https ://registry.k8s.io/v2/pause/manifests/3.9\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/pause:3.9"
time="2024-08-22T18:48:42-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/pause:3.9\": failed to resolve reference \"registry.k8s.io/pause:3.9\": failed to do request: Head \"https://registry.k8s.io/v2/pause/manifests/3.9\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.9-0: output: E0822 18:51:12.869262 3851 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/etcd:3.5.9-0\": failed to resolve reference \"registry.k8s.io/etcd:3.5.9-0\": failed to do request: Head \"https ://registry.k8s.io/v2/etcd/manifests/3.5.9-0\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/etcd:3.5.9-0"
time="2024-08-22T18:51:12-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/etcd:3.5.9-0\": failed to resolve reference \"registry.k8s.io/etcd:3.5.9-0\": failed to do request: Head \"https://registry.k8s.io/v2/etcd/manifests/3.5.9-0\": dial tcp 34.96.108.209:443: i/o timeout"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.10.1: output: E0822 18:53:43.141842 3880 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/coredns/coredns:v1.10.1\": failed to resolve reference \"registry.k8s.io/coredns/coredns:v1.10.1\": failed to do request: Head \"https://registry.k8s.io/v2/coredns/coredns/manifests/v1.10.1\": dial tcp 34.96.108.209:443: i/o timeout" image="registry.k8s.io/coredns/coredns:v1.10.1"
time="2024-08-22T18:53:43-04:00" level=fatal msg="pulling image: rpc error: code = DeadlineExceeded desc = failed to pull and unpack image \"registry.k8s.io/coredns/coredns:v1.10.1\": failed to resolve reference \"registry.k8s.io/coredns/coredns:v1.10.1\": failed to do request: Head \"https://registry.k8s.io/v2/coredns/coredns/manifests/v1.10.1\": dial tcp 34.96.108.209: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=...`
error execution phase preflight
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run.func1
cmd/kubeadm/app/cmd/phases/workflow/runner.go:260
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).visitAll
cmd/kubeadm/app/cmd/phases/workflow/runner.go:446
k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow.(*Runner).Run
cmd/kubeadm/app/cmd/phases/workflow/runner.go:232
k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdInit.func1
cmd/kubeadm/app/cmd/init.go:111
github.com/spf13/cobra.(*Command).execute
vendor/github.com/spf13/cobra/command.go:940
github.com/spf13/cobra.(*Command).ExecuteC
vendor/github.com/spf13/cobra/command.go:1068
github.com/spf13/cobra.(*Command).Execute
vendor/github.com/spf13/cobra/command.go:992
k8s.io/kubernetes/cmd/kubeadm/app.Run
cmd/kubeadm/app/kubeadm.go:50
main.main
cmd/kubeadm/kubeadm.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1598
Hi,
You can try to config containerd proxy by adding these line in your containerd service file
Environment=“HTTP_PROXY=http://proxy_ip:port/”
Environment=“HTTPS_PROXY=http:// proxy_ip:port /”
Environment=“NO_PROXY=10.96.0.0/16,127.0.0.1,192.168.0.0/16,localhost”
Thanks for reaching out,
I added the HTTP_PROXY settings in the containerd.service and issued the following commands, but that did not help.
I issued the following command to pull the images in advance for kubeadm init to succeed later.
**kubeadm config images pull --v=5**
I0823 10:08:34.417695 4610 initconfiguration.go:117] detected and using CRI socket: unix:///var/run/containerd/containerd.sock
I0823 10:08:34.420868 4610 interface.go:432] Looking for default routes with IPv4 addresses
I0823 10:08:34.420936 4610 interface.go:437] Default route transits interface "ens3"
I0823 10:08:34.421241 4610 interface.go:209] Interface ens3 is up
I0823 10:08:34.421442 4610 interface.go:257] Interface "ens3" has 2 addresses :[[192.168.122.48/24](http://192.168.122.48/24) fe80::5054:ff:fe43:42cf/64].
I0823 10:08:34.421637 4610 interface.go:224] Checking addr [192.168.122.48/24](http://192.168.122.48/24).
I0823 10:08:34.421765 4610 interface.go:231] IP found 192.168.122.48
I0823 10:08:34.421911 4610 interface.go:263] Found valid IPv4 address 192.168.122.48 for interface "ens3".
I0823 10:08:34.422035 4610 interface.go:443] Found active IP 192.168.122.48
I0823 10:08:34.422145 4610 kubelet.go:196] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
I0823 10:08:34.429261 4610 version.go:187] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.txt
I0823 10:08:36.077502 4610 version.go:256] remote version is much newer: v1.31.0; falling back to: stable-1.28
I0823 10:08:36.080642 4610 version.go:187] fetching Kubernetes version from URL: https://dl.k8s.io/release/stable-1.28.txt
exit status 1
output: time="2024-08-23T10:08:38-04:00" level=fatal msg="validate service connection: validate CRI v1 image API for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial unix /var/run/containerd/containerd.sock: connect: permission denied\""
, error
[k8s.io/kubernetes/cmd/kubeadm/app/util/runtime.(*CRIRuntime).PullImage](http://k8s.io/kubernetes/cmd/kubeadm/app/util/runtime.(*CRIRuntime).PullImage)
cmd/kubeadm/app/util/runtime/runtime.go:139
[k8s.io/kubernetes/cmd/kubeadm/app/cmd.PullControlPlaneImages](http://k8s.io/kubernetes/cmd/kubeadm/app/cmd.PullControlPlaneImages)
cmd/kubeadm/app/cmd/config.go:390
[k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdConfigImagesPull.func1](http://k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdConfigImagesPull.func1)
cmd/kubeadm/app/cmd/config.go:376
[github.com/spf13/cobra.(*Command).execute](http://github.com/spf13/cobra.(*Command).execute)
vendor/[github.com/spf13/cobra/command.go:940](http://github.com/spf13/cobra/command.go:940)
[github.com/spf13/cobra.(*Command).ExecuteC](http://github.com/spf13/cobra.(*Command).ExecuteC)
vendor/[github.com/spf13/cobra/command.go:1068](http://github.com/spf13/cobra/command.go:1068)
[github.com/spf13/cobra.(*Command).Execute](http://github.com/spf13/cobra.(*Command).Execute)
vendor/[github.com/spf13/cobra/command.go:992](http://github.com/spf13/cobra/command.go:992)
[k8s.io/kubernetes/cmd/kubeadm/app.Run](http://k8s.io/kubernetes/cmd/kubeadm/app.Run)
cmd/kubeadm/app/kubeadm.go:50
main.main
cmd/kubeadm/kubeadm.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1598
failed to pull image "[registry.k8s.io/kube-apiserver:v1.28.13](http://registry.k8s.io/kube-apiserver:v1.28.13)"
[k8s.io/kubernetes/cmd/kubeadm/app/cmd.PullControlPlaneImages](http://k8s.io/kubernetes/cmd/kubeadm/app/cmd.PullControlPlaneImages)
cmd/kubeadm/app/cmd/config.go:391
[k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdConfigImagesPull.func1](http://k8s.io/kubernetes/cmd/kubeadm/app/cmd.newCmdConfigImagesPull.func1)
cmd/kubeadm/app/cmd/config.go:376
[github.com/spf13/cobra.(*Command).execute](http://github.com/spf13/cobra.(*Command).execute)
vendor/[github.com/spf13/cobra/command.go:940](http://github.com/spf13/cobra/command.go:940)
[github.com/spf13/cobra.(*Command).ExecuteC](http://github.com/spf13/cobra.(*Command).ExecuteC)
vendor/[github.com/spf13/cobra/command.go:1068](http://github.com/spf13/cobra/command.go:1068)
[github.com/spf13/cobra.(*Command).Execute](http://github.com/spf13/cobra.(*Command).Execute)
vendor/[github.com/spf13/cobra/command.go:992](http://github.com/spf13/cobra/command.go:992)
[k8s.io/kubernetes/cmd/kubeadm/app.Run](http://k8s.io/kubernetes/cmd/kubeadm/app.Run)
cmd/kubeadm/app/kubeadm.go:50
main.main
cmd/kubeadm/kubeadm.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1598