Not able to start a pod using kubectl and minikube despite setting ImagePullPolicy=Never

4/30/2020

I am not able to get my pod running on Kubernetes locally on Windows 10 using minikube and kubectl. I am using gitbash to execute all these commands.

Not sure how to go about debugging this.

$ docker images

REPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE
greet                                     latest              a76a04eeef12        18 seconds ago      282MB
adoptopenjdk/openjdk11                    alpine-slim         375fda052218        2 weeks ago         254MB
k8s.gcr.io/kube-proxy                     v1.18.0             43940c34f24f        5 weeks ago         117MB
k8s.gcr.io/kube-controller-manager        v1.18.0             d3e55153f52f        5 weeks ago         162MB
k8s.gcr.io/kube-scheduler                 v1.18.0             a31f78c7c8ce        5 weeks ago         95.3MB
k8s.gcr.io/kube-apiserver                 v1.18.0             74060cea7f70        5 weeks ago         173MB
kubernetesui/dashboard                    v2.0.0-rc6          cdc71b5a8a0e        6 weeks ago         221MB
k8s.gcr.io/pause                          3.2                 80d28bedfe5d        2 months ago        683kB
k8s.gcr.io/coredns                        1.6.7               67da37a9a360        3 months ago        43.8MB
kindest/kindnetd                          0.5.3               aa67fec7d7ef        6 months ago        78.5MB
k8s.gcr.io/etcd                           3.4.3-0             303ce5db0e90        6 months ago        288MB
kubernetesui/metrics-scraper              v1.0.2              3b08661dc379        6 months ago        40.1MB
gcr.io/k8s-minikube/storage-provisioner   v1.8.1              4689081edb10        2 years ago         80.8MB

$ kubectl run greet-foo --image=greet:latest --image-pull-policy=Never

pod/greet-foo created

$ kubectl get pods

NAME        READY   STATUS              RESTARTS   AGE
greet-foo   0/1     ErrImageNeverPull   0          13s
-- Nital
docker
git-bash
kubernetes
minikube
windows

2 Answers

4/30/2020

I'm guessing you meant kubectl run greet-foo --image=greet:latest --image-pull-policy=Never

-- Bad_Coder
Source: StackOverflow

5/6/2020

The following command worked for me.

kubectl run greet-foo --image=greet:latest --image-pull-policy=Never
-- Nital
Source: StackOverflow