ImagePullBackOff on Garden Deploy
# 🌱|help-and-getting-started
Hi all, On first run of garden deploy, the command is successful and we have a container running in cluster. However, upon subsequent deployments, we often run into an ImagePullBackOff error during the deploy stage. The (truncated) results of garden deploy are as follows:
Copy code
garden deploy --log-level=verbose
ℹ deploy.backend2      → Deploying version v-c07c2b4b3c...
ℹ deploy.backend2      → Waiting for resources to be ready...
ℹ deploy.backend2 [verbose] → [kubernetes-plugin] Waiting for resources to be ready...
ℹ deploy.backend2 [verbose] → [kubernetes-plugin] Status of Deployment backend2 is "unhealthy"
ℹ deploy.backend2 [verbose] → [kubernetes-plugin] Error deploying deploy.backend2: ImagePullBackOff - Back-off pulling image "backend2:v-aa19766a21"

━━━ Events ━━━
Pod backend2-9f79b47fc-9mj89: Pulling - Pulling image "backend2:v-aa19766a21"
Pod backend2-9f79b47fc-9mj89: Failed - Failed to pull image "backend2:v-aa19766a21": rpc error: code = Unknown desc = Error response from daemon: pull access denied for backend2, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Our setup is a local environment that points to a local minikube instance. We are trying to deploy a docker container to the local cluster upon garden deploy. We are currently not trying to push docker images to dockerhub if that is part of this issue. The full logs are attached, along with our garden yaml files. I think we most likely have a configuration issue so I doubt this is a bug, but I'd really appreciate any guidance on what to look into to fix this issue!
Hi @sparse-plastic-7047 and welcome to the community! 👋 What's happening here is minikube is checking Docker Hub and its own internal image registry for the image you've built. Minikube never checks your local registry, which
pushes to. Can you try and run
eval $(minikube -p minikube docker-env)
docker build .
in the directory where your
is located? That will build and push to minikube's internal image registry by exporting its own
and other variables to your shell.
@quaint-dress-831 That worked perfectly. Thanks so much for the help!
@sparse-plastic-7047 awesome! For more on what's going on behind the scenes, the linked article below is a great primer. (I had to run it through an archive site because Medium likes to block readers without subscriptions.)
For disposable clusters, I can also recommend checking out our new ephemeral clusters 🪶