Minikube failing to pull local docker image

7/23/2018

I am trying to create a mapping for a gRPC service with ambassador, a load balancer. To deploy and map the service, I created a yaml file that has the following lines (among others):

containers:
      - name: grpc-pep
        image: enm10k
        imagePullPolicy: IfNotPresent
        ports:

When I deploy it and run kubectl get pods, I get the following message:

NAME                                             READY     STATUS         RESTARTS   AGE
ambassador-567f8c7c6-68bx6                       2/2       Running        3          3d
ambassador-567f8c7c6-c2n6z                       2/2       Running        3          3d
ambassador-567f8c7c6-kjznt                       2/2       Running        5          3d
grpc-pep-5f54b8d77b-f4l94                        0/1       ErrImagePull   0          3m

I am getting an ErrImagePull error message for the image I am trying to to access. enm10k is a dockerhub image, and I am under the impression that I should not be creating it. But, even when I do to create it, I get the following error message:

tex@tex-ThinkPad-P50:~$ docker build -t enk10k .
WARN[0000] Unable to use system certificate pool: requires building with go 1.7 or later 
Error checking context: 'no permission to read from '/home/tex/.cpan/build/CPAN-Meta-YAML-0.018-YA9MFT/lib/CPAN/Meta/YAML.pm''.

When I try to build it in a place that is not home directory:

$ docker build -t enm10k .
WARN[0000] Unable to use system certificate pool: requires building with go 1.7 or later 
Sending build context to Docker daemon 980.1 MB
Error response from daemon: unexpected error reading Dockerfile: read /var/lib/docker/tmp/docker-builder360563372/Dockerfile: is a directory

So, I cannot build the image, I cannot find it, and I am not sure how to approach it. I have set the minikube environment $ eval $(minikube docker-env) and I have used just about all policy variations for the imagePullPolicy in the yaml file.

I am not sure how to approach this - hopefully someone with more Docker knowledge can assist me.

-- John Lexus
docker
kubernetes
minikube

1 Answer

7/24/2018

You have a mistake in the yaml file, as it's missing repository name.

containers:
      - name: grpc-pep
        image: enm10k
        imagePullPolicy: IfNotPresent
        ports:

If you go to hub.docker.com and search for enm10k, you will see 3 repositories. In your example, docker does not know which repo to pull.

The yaml files should look like this:

containers:
      - name: grpc-pep
        image: enm10k/grpc-hello-world
        imagePullPolicy: IfNotPresent
        ports:

You can also check the documentation on how to get gRPC and Ambassador.

-- Crou
Source: StackOverflow