https://rancher.com/ logo
Title
m

millions-sunset-36049

12/19/2022, 4:38 AM
Hello, when creating a cluster with k3d managed local registry using
registry-create
flag is it possible to specify a volume that will be used to store/cache the images? This is to allow the cache to persist in the event the cluster is deleted. I got a k3d managed local registry to work using
registry-use
and
registry-config
but unfortunately it doesn't play nice with Tilt.
w

wide-garage-9465

12/19/2022, 7:10 AM
Hi there! What's the problem with the separately created registry and Tilt?
m

millions-sunset-36049

12/19/2022, 2:33 PM
With a separate k3d managed local registry, Tilt is unable to push a
docker_build
image to that registry. It is stuck at:
STEP 2/3 — Pushing localhost:53419/web:tilt-249c7722da12698c
  Pushing with Docker client
  Authenticating to image repo: localhost:53419
  Sending image data
  0d899785e82a: Retrying in 1 seconds 
  f335579cab20: Retrying in 1 seconds 

Build Failed: docker push: pushing image "localhost:53419/web": unsupported
w

wide-garage-9465

12/19/2022, 2:52 PM
And when doing it with
--registry-create
, that same thing succeeds? 🤔
m

millions-sunset-36049

12/19/2022, 2:52 PM
Strangely, yes.
I even tried to copy the
registry.yml
that k3d generates, align it to the k3d registry that I created and use it but unfortunately it throws the same error again 😞
w

wide-garage-9465

12/19/2022, 8:59 PM
But Tilt is outside of the cluster isn't it? So the registries.yaml shouldn't have any influence, right?
m

millions-sunset-36049

12/19/2022, 9:05 PM
Yeah, Tilt auto detects the local registry from the cluster. What I meant about using
registry.yml
was adding the additional mirrors. For example:
mirrors:
  "localhost:53419":
    endpoint:
      - <http://k3d-mylocal-registry.localhost:5000>
  "mylocal-registry.localhost":
    endpoint:
      - <http://k3d-mylocal-registry.localhost:5000>
  "mylocal-registry.localhost:5000":
    endpoint:
      - <http://k3d-mylocal-registry.localhost:5000>
Identified the root cause of the issue. My registry was setup as a pull-through proxy and it doesn't support push.