devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.17k stars 351 forks source link

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

Open matthewcummings opened 1 month ago

matthewcummings commented 1 month ago

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:

deniseschannon commented 1 month ago

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