I ran eval $(minikube docker-env)
then built a docker container. When I run docker images
on my host I can see the image. When I run minikube ssh
then docker images
I can see it.
When I try to run it, the pod fails to launch. kubectl describe pod
gives:
14m 3m 7 kubelet, minikube spec.containers{quoting-crab-customer-refresh-cache-cron} Normal Pulling pulling image "personalisation-customer:latest"
14m 3m 7 kubelet, minikube spec.containers{quoting-crab-customer-refresh-cache-cron} Warning Failed Failed to pull image "personalisation-customer:latest": rpc error: code = 2 desc = Error: image library/personalisation-customer:latest not found
14m 2s 66 kubelet, minikube Warning FailedSync Error syncing pod
14m 2s 59 kubelet, minikube spec.containers{quoting-crab-customer-refresh-cache-cron} Normal BackOff Back-off pulling image "personalisation-customer:latest"
My imagePullPolicy
is Always
.
What could be causing this? Other pods are working locally.
You aren't exactly pulling from your local registry, you are using your previously downloaded images or your locally builded, since you are specifying
imagePullPolicy: Always
this will always try to pull it from the registry.Your image doesn't contain a specific docker registry
personalisation-customer:latest
for what docker will understandindex.docker.io/personalisation-customer:latest
and this is an image that doesn't exist in the public docker registry.So you have 2 options
imagePullPolicy: IfNotPresent
or to upload the image to some registry.