Welcome to the Linux Foundation Forum!

[LFS258] : Getting "[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.29.1"

I am trying to install control plane node using instructions mentioned in the pdf file of LFS258 course : Lab3.1 : Install Kubernetes
While executing "kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.out" command I am getting these errors:
root@cp1:~# kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.out
[init] Using Kubernetes version: v1.29.1
[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'
W0718 11:06:58.616485 56774 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.8" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image.
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.29.1: output: E0718 11:06:54.234274 56863 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-apiserver:v1.29.1\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.29.1\": failed to do request: Head \"https://asia-south1-docker.pkg.dev/v2/k8s-artifacts-prod/images/kube-apiserver/manifests/v1.29.1\": read tcp 10.237.76.135:46734->64.233.170.82:443: read: connection reset by peer" image="registry.k8s.io/kube-apiserver:v1.29.1"
time="2024-07-18T11:06:54Z" level=fatal msg="pulling image: failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.29.1\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.29.1\": failed to do request: Head \"https://asia-south1-docker.pkg.dev/v2/k8s-artifacts-prod/images/kube-apiserver/manifests/v1.29.1\": read tcp 10.237.76.135:46734->64.233.170.82:443: read: connection reset by peer"
, error: exit status 1
[ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.29.1: output: E0718 11:06:55.327594 56921 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-controller-manager:v1.29.1\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.29.1\": failed to do request: Head \"https://asia-south1-docker.pkg.dev/v2/k8s-artifacts-prod/images/kube-controller-manager/manifests/v1.29.1\": read tcp 10.237.76.135:46762->64.233.170.82:443: read: connection reset by peer" image="registry.k8s.io/kube-controller-manager:v1.29.1"
time="2024-07-18T11:06:55Z" level=fatal msg="pulling image: failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.29.1\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.29.1\": failed to do request: Head \"https://asia-south1-docker.pkg.dev/v2/k8s-artifacts-prod/images/kube-controller-manager/manifests/v1.29.1\": read tcp 10.237.76.135:46762->64.233.170.82:443: read: connection reset by peer"

I am getting these errors for these images which kubeadm is trying to pull:
registry.k8s.io/kube-apiserver:v1.29.1
registry.k8s.io/kube-controller-manager:v1.29.1
registry.k8s.io/kube-scheduler:v1.29.1
registry.k8s.io/kube-proxy:v1.29.1
registry.k8s.io/coredns/coredns:v1.11.1
registry.k8s.io/pause:3.9
registry.k8s.io/etcd:3.5.12-0

I have followed pdf steps in order. Still getting this error.
Is there any workaround to this issue?
I am using "Ubuntu 20.04.6 LTS" vm which is in office lab.

Thanks!

Answers

  • chrispokorni
    chrispokorni Posts: 2,340

    Hi @tdhanu2000,

    If this is a VM provisioned on an office infrastructure, please verify with your company infra admins that there are no firewalls, proxies, or policies in place that are preventing access to the desired image registries.

    Alternately, you may try to provision the VM on a personal workstation, or on a cloud VM (AWS, GCP, Azure, IBM Cloud, Digital Ocean, etc...)

    Regards,
    -Chris

  • tdhanu2000
    tdhanu2000 Posts: 3

    Thanks @chrispokorni ! admins may not be able to alter security policies. So I have moved to GCP.
    I was able to deploy Kubernetes 1.29 cluster as per instructions in chapter 3. It worked perfectly.
    Thanks again!

Categories

Upcoming Training