[ERROR ImagePull]: failed to pull image registry.k8s.io/image_name

I’m newbie and start kubernetes from google.com on Debian stable.
Now, I using the following command for initializing kuber:
kubeadm init --apiserver-advertise-address=192.168.0.120 --pod-network-cidr=192.168.0.0/24
Then I get the following error:
W0903 09:38:45.656585 765 version.go:104] could not fetch a Kubernetes version from the internet: unable to fetch file. URL: "https://dl.k8s.io/release/stable-1.txt", status: 403 Forbidden W0903 09:38:45.657311 765 version.go:105] falling back to the local client version: v1.25.0 [init] Using Kubernetes version: v1.25.0 [preflight] Running pre-flight checks [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet [WARNING SystemVerification]: missing optional cgroups: blkio [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: E0903 09:38:50.298677 817 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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" image="registry.k8s.io/kube-apiserver:v1.25.0" time="2022-09-03T09:38:50-04: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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.25.0: output: E0903 09:38:54.581273 846 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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" image="registry.k8s.io/kube-controller-manager:v1.25.0" time="2022-09-03T09:38:54-04: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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-scheduler:v1.25.0: output: E0903 09:39:01.439525 880 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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" image="registry.k8s.io/kube-scheduler:v1.25.0" time="2022-09-03T09:39:01-04: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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-proxy:v1.25.0: output: E0903 09:39:05.667392 907 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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" image="registry.k8s.io/kube-proxy:v1.25.0" time="2022-09-03T09:39:05-04: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\": pulling from host registry.k8s.io failed with status code [manifests v1.25.0]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/pause:3.8: output: E0903 09:39:14.967580 935 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/pause:3.8\": failed to resolve reference \"registry.k8s.io/pause:3.8\": pulling from host registry.k8s.io failed with status code [manifests 3.8]: 403 Forbidden" image="registry.k8s.io/pause:3.8" time="2022-09-03T09:39:14-04:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/pause:3.8\": failed to resolve reference \"registry.k8s.io/pause:3.8\": pulling from host registry.k8s.io failed with status code [manifests 3.8]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/etcd:3.5.4-0: output: E0903 09:39:22.857039 973 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\": pulling from host registry.k8s.io failed with status code [manifests 3.5.4-0]: 403 Forbidden" image="registry.k8s.io/etcd:3.5.4-0" time="2022-09-03T09:39:22-04: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\": pulling from host registry.k8s.io failed with status code [manifests 3.5.4-0]: 403 Forbidden" , error: exit status 1 [ERROR ImagePull]: failed to pull image registry.k8s.io/coredns/coredns:v1.9.3: output: E0903 09:39:25.557006 1001 remote_image.go:218] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/coredns/coredns:v1.9.3\": failed to resolve reference \"registry.k8s.io/coredns/coredns:v1.9.3\": pulling from host registry.k8s.io failed with status code [manifests v1.9.3]: 403 Forbidden" image="registry.k8s.io/coredns/coredns:v1.9.3" time="2022-09-03T09:39:25-04:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/coredns/coredns:v1.9.3\": failed to resolve reference \"registry.k8s.io/coredns/coredns:v1.9.3\": pulling from host registry.k8s.io failed with status code [manifests v1.9.3]: 403 Forbidden" , 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

It can’t pull images.
How can I solve it?

Cluster information:

Kubernetes version: v1.25.0
Cloud being used: (put bare-metal if not on a public cloud)
Installation method: via packages from google.com
Host OS: Linux Debian
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.

seems like authentication required to pull the images and you are getting a 403 HTTP response (forbidden), BUT whe I try to pull the images from my computer I am not required to authenticate.

Could it be that you have some kind of credentials setup for registry.k8s.io and those do not have the permission to pull the images?

I only configure according to google website.Not any extra configurations.

what container runtime are you using? and what google website? do you mean kubernetes.io?

Oh, I solved it, I’m in Iran and my host banned by google. Then i set a proxy and everything is ok.

1 Like