docker has image, but kubernetes says not

10/18/2017

I was trying to build with Kubernetes, and I was wanted to use the local image which I pulled in the early days to save time.(So it does not have to pull a image every time a container is created).The problem is that Kubernetes just ignored my local images.

For example. when I run docker images, I got this in the list

gcr.io/google_containers/k8s-dns-kube-dns-amd64                               1.14.1              f8363dbf447b        7 months ago        52.36 MB

But when I tried to build a deployment with the config(just a part of the config file)

image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.1
imagePullPolicy: Never

It said Container image "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.1" is not present with pull policy of Never

I wonder if there is anything I missed. Thanks for help!

-- klew
kubernetes

2 Answers

4/20/2018

If you are using a Kubernetes cluster, you have to make sure the Docker image you need is available in all nodes, as you don't really know which one will get assigned the Pod.

So: pull/build the needed image from each cluster node.

-- Enrico M.
Source: StackOverflow

10/18/2017

If you look closely, you'll notice that the name of the image it's saying is missing is not the same as the one you pulled yourself. It looks like you're attempting to deploy kube-dns, which is made up of multiple images. You'll need to pull each one of them (or allow Kubernetes to pull them on your behalf) for the entire thing to work. Take a look at the configuration files you're using to deploy again—you should find other containers in the pod specifying the other images.

-- Jimmy Cuadra
Source: StackOverflow