Create locale registry
create-podman-registry.sh
#!/bin/sh
reg_name='kind-registry'
reg_port='5000'
running="$(podman inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
if [ "${running}" != 'true' ]; then
podman run \
-d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
registry:2
fi
kind cluster config with local registry
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
endpoint = ["http://kind-registry:5000"]
Create new Kind cluster with access to local registry
kind create cluster --config local-registry.yaml
Connect networks
podman network connect "kind" "kind-registry"