Skip to content

Add local kind registry for Tilt development setup#310

Open
felix-kaestner wants to merge 1 commit intomainfrom
chore/kind-registry
Open

Add local kind registry for Tilt development setup#310
felix-kaestner wants to merge 1 commit intomainfrom
chore/kind-registry

Conversation

@felix-kaestner
Copy link
Copy Markdown
Contributor

This change introduces hack/kind-with-registry.sh, adapted from https://kind.sigs.k8s.io/docs/user/local-registry and inspired by the now-archived https://github.com/tilt-dev/kind-local, and wires it into the make kind-create and make kind-delete targets.

A local registry is preferred over alternatives such as 'kind load docker-image' because Docker layer caching applies when pushing to a registry: layers that already exist in the registry are skipped, so only the changed layers are transferred. With kind load every push uploads the full image regardless of what changed. In addition, all traffic stays on the local machine with no network round-trips to a remote registry. Tilt (v0.12.0+) auto-detects the registry through the KEP-1755 local-registry-hosting ConfigMap published in kube-public and handles the image-tagging dance automatically.

The script starts a registry:3 container bound to localhost:5000, creates the kind cluster (requires kind v0.27.0+), configures each node's containerd to resolve localhost:5000 to the registry container via /etc/containerd/certs.d/localhost:/hosts.toml, connects the registry container to the kind Docker network so that the nodes can reach it by name, and publishes the local-registry-hosting ConfigMap. make kind-delete tears down both the cluster and the registry container.

This change introduces hack/kind-with-registry.sh, adapted from
https://kind.sigs.k8s.io/docs/user/local-registry and inspired by
the now-archived https://github.com/tilt-dev/kind-local, and wires
it into the make kind-create and make kind-delete targets.

A local registry is preferred over alternatives such as
'kind load docker-image' because Docker layer caching applies when
pushing to a registry: layers that already exist in the registry are
skipped, so only the changed layers are transferred. With kind load
every push uploads the full image regardless of what changed. In
addition, all traffic stays on the local machine with no network
round-trips to a remote registry. Tilt (v0.12.0+) auto-detects the
registry through the KEP-1755 local-registry-hosting ConfigMap
published in kube-public and handles the image-tagging dance
automatically.

The script starts a registry:3 container bound to localhost:5000,
creates the kind cluster (requires kind v0.27.0+), configures each
node's containerd to resolve localhost:5000 to the registry container
via /etc/containerd/certs.d/localhost:<port>/hosts.toml, connects the
registry container to the kind Docker network so that the nodes can
reach it by name, and publishes the local-registry-hosting ConfigMap.
make kind-delete tears down both the cluster and the registry
container.
@felix-kaestner felix-kaestner requested a review from a team as a code owner April 17, 2026 12:33
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Apr 18, 2026
@hardikdr hardikdr added this to Roadmap Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/M

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants