Skip to content

Local Registry

The local registry gives kinder clusters a private container registry at localhost:5001. Push images from your host and pull them directly in pods — no external registry or image loading required.

kinder installs the registry:2 image.

ResourceNamespace / LocationPurpose
kind-registry containerDocker/Podman hostRuns the registry on port 5001
containerd certs.d configAll cluster nodesRoutes localhost:5001 to the registry container
local-registry-hosting ConfigMapkube-publicDev tool discovery (Tilt, Skaffold, etc.)

The registry runs as a standalone container on the same Docker/Podman network as the cluster nodes. Each node is configured with a containerd hosts.toml entry that resolves localhost:5001 to the registry container. This means both the host machine and pods inside the cluster can push and pull from the same address.

The registry container persists across cluster recreations — cached images survive kinder delete cluster and kinder create cluster.

Push an image from your host:

Terminal window
docker build -t localhost:5001/myapp:latest .
docker push localhost:5001/myapp:latest

Reference it in a pod:

apiVersion: v1
kind: Pod
metadata:
name: myapp
spec:
containers:
- name: myapp
image: localhost:5001/myapp:latest

After creating a cluster, confirm the registry container is running:

Terminal window
docker ps --filter name=kind-registry

Expected output:

CONTAINER ID IMAGE ... PORTS NAMES
abc123 registry:2 ... 0.0.0.0:5001->5000/tcp kind-registry

Verify the ConfigMap exists for dev tool discovery:

Terminal window
kubectl get configmap local-registry-hosting -n kube-public -o yaml

Test a full push-and-pull cycle:

Terminal window
docker pull nginx:alpine
docker tag nginx:alpine localhost:5001/nginx:test
docker push localhost:5001/nginx:test
kubectl run regtest --image=localhost:5001/nginx:test
kubectl get pod regtest

The local registry is controlled by the addons.localRegistry field in your cluster config:

apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
addons:
localRegistry: true # default

See the Configuration Reference for all available addon fields.

To create a cluster without the local registry, set localRegistry: false:

apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
addons:
localRegistry: false

The local-registry-hosting ConfigMap in kube-public follows KEP-1755, which allows tools like Tilt and Skaffold to auto-discover the registry endpoint. No additional configuration is needed in these tools.

Build and push multiple images, then verify they are all available in the registry:

Terminal window
docker build -t localhost:5001/frontend:v1 ./frontend
docker push localhost:5001/frontend:v1
docker build -t localhost:5001/backend:v1 ./backend
docker push localhost:5001/backend:v1

Verify both images are registered:

Terminal window
curl http://localhost:5001/v2/_catalog

Expected output:

{"repositories":["backend","frontend"]}

Reference both images in a Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 1
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: frontend
image: localhost:5001/frontend:v1
- name: backend
image: localhost:5001/backend:v1

The simplest cleanup approach is to re-push with the same tag to overwrite an existing image:

Terminal window
docker build -t localhost:5001/myapp:latest .
docker push localhost:5001/myapp:latest # overwrites the previous image

To list all tags for a specific image:

Terminal window
curl http://localhost:5001/v2/myapp/tags/list

Note that registry:2 does not garbage-collect by default — disk space is reclaimed only when the registry container is recreated. For a fresh start:

Terminal window
docker rm -f kind-registry

The registry will be recreated on the next kinder create cluster.

Symptom: kubectl describe pod shows Failed to pull image "localhost:5001/myapp:latest" with ImagePullBackOff.

Cause: The kind-registry container is not running — it may have been stopped or removed.

Fix: Check whether the registry is running:

Terminal window
docker ps --filter name=kind-registry

If the container exists but is stopped, start it:

Terminal window
docker start kind-registry

If it was removed, the simplest fix is to recreate the cluster:

Terminal window
kinder create cluster

This recreates the registry container automatically.