https://garden.io logo
#🌱|help-and-getting-started
ImagePullBackOff on Garden Deploy
# 🌱|help-and-getting-started
s

sparse-plastic-7047

11/27/2023, 5:05 PM
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! https://cdn.discordapp.com/attachments/1178743505464606760/1178743505997266965/ConsoleLog.txt?ex=6577416f&is=6564cc6f&hm=ec5e8ec56a5f30e1d5fabb4e5a7bc235dc9fc36dfcc87f4485d607ecb7c10d25& https://cdn.discordapp.com/attachments/1178743505464606760/1178743506349592646/project.garden.yaml?ex=6577416f&is=6564cc6f&hm=94176805d020b2121b6309752b6d23e2484e4617fe46965c9a04d6500fba3031& https://cdn.discordapp.com/attachments/1178743505464606760/1178743506672550020/service.garden.yaml?ex=6577416f&is=6564cc6f&hm=20d8636c9be4bb329b215483e71414d6caf3af71c6abc78a2dc7c7619dd8a120&
q

quaint-dress-831

11/27/2023, 7:12 PM
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
garden
pushes to. Can you try and run
eval $(minikube -p minikube docker-env)
then
docker build .
in the directory where your
Dockerfile
is located? That will build and push to minikube's internal image registry by exporting its own
DOCKER_HOST
and other variables to your shell.
s

sparse-plastic-7047

11/27/2023, 7:40 PM
@quaint-dress-831 That worked perfectly. Thanks so much for the help!
q

quaint-dress-831

11/27/2023, 7:42 PM
@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.) https://archive.vn/3XMHz
For disposable clusters, I can also recommend checking out our new ephemeral clusters 🪶 https://docs.garden.io/kubernetes-plugins/ephemeral-k8s