k3d
k3d copied to clipboard
Feat: integrate registry proxy in k3d
Original issue comment below:
I ran into this issue as well (came up because I kept hitting docker.io rate limits), so created a custom registry that proxies all image requests to the host docker instance: https://github.com/ligfx/k3d-registry-dockerd
I use it like so:
configfile=$(mktemp)
cat << HERE > "$configfile"
apiVersion: k3d.io/v1alpha5
kind: Simple
registries:
create:
image: ligfx/k3d-registry-dockerd:v0.1
proxy:
remoteURL: "*"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
HERE
k3d cluster create mytest --config "$configfile"
It's also had the side effect of significantly speeding up cluster creation and pod rollout, which is nice!
Originally posted by @ligfx in https://github.com/k3d-io/k3d/issues/19#issuecomment-1967513596
@ligfx if you're up for it, we could move your repo over to the k3d-io org or even integrate it into the k3d repo (just like proxy and lb). Then we add the builds to the official CI pipeline.
Feature wise I would add a flag to cluster create that will use your registry.
Same for registry create.
So just shortcuts to what you'd else do manually.
I'd assign you as the code owner of that part, no matter where it lands.
WDYT?
hi! It seems that the feature was already implemented and documented here, years ago, hence may be you'd like to elaborate on why a new registry proxy was necessary.
@nnWhisperer It is far easier to use ligfx's proxy than configuring multiple proxies. Example: https://github.com/k3d-io/k3d/issues/1548
I still opted for the latter approach (to keep my local docker store cleaner) but honestly the cost/benefit is poor.