devspace-sh/devspace

Cannot pull images from my local registry - getting ImagePullBackoff errors.

matthewcummings opened this issue · 2 comments

What happened?
I've been using DevSpace (versions 6.3.1 up to 6.3.12, I've tried them all) with K3d. I'm using a very basic local registry config:

localRegistry:
  enabled: true
  localbuild: true

This was working perfectly fine with my locally built images and then at some point, it just stopped working. I can see that my pods are trying to pull from localhost on the NodePort port:

Failed to pull image "localhost:32014/<MY_IMAGE>/<PATH>:ILUQyVn": rpc error: code = Unknown desc = failed to pull and unpack image "localhost:32014/<MY_IMAGE>/<PATH>:ILUQyVn": failed to resolve reference "localhost:32014/<MY_IMAGE>/<PATH>:ILUQyVn": failed to do request: Head "http://localhost:32014/v2/<MY_IMAGE>/<PATH>/manifests/ILUQyVn": dial tcp [::1]:32014: connect: connection refused
  Warning  Failed     13m (x3 over 13m)     kubelet            Error

What did you expect to happen instead?
I expected that the pods could just pull the local registry images and run successefully.

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

version: ...
...

Local Environment:

  • DevSpace Version: 6.3.12
  • Operating System: linux
  • ARCH of the OS: AMD64
    Kubernetes Cluster:
  • Cloud Provider: k3d
  • Kubernetes Version: 1.27
    Anything else we need to know?

We haven't tested using local registries with k3d, but have you tried any other k8s distros and the local registry?

I have the same issue with 6.3.12.

DevSpace Version: 6.3.12
Operating System: macOS 14.4.1
ARCH of the OS: AMD64

It builds fine with devspace build

localhost:31081/create-text sFthWKG 9120541b7c65 7 minutes ago 85.8MB

the logs show this:

build:create-text Done processing image 'localhost:5000/create-text'
build:create-text #13 pushing manifest for localhost:5000/create-text:sFthWKG@sha256:bd3214b8fb6ecd5834ca97df80d20ec762317864484c7b972d2bbfe44a6207d2 0.0s done

@matthewcummings try pointing your deployments to whatever port its actually building to and it should work. Looks like a bug to me.

In my case, My deployments point to localhost:31081/create-text and not localhost:5000/create-tex