diff --git a/dev/podman/kind-with-registry-podman.sh b/dev/podman/kind-with-registry-podman.sh new file mode 100755 index 000000000..a3ba77658 --- /dev/null +++ b/dev/podman/kind-with-registry-podman.sh @@ -0,0 +1,69 @@ +#!/bin/sh +set -o errexit + +# 1. Create registry container unless it already exists +reg_name='kind-registry' +reg_port='5001' +int_port='5000' +if [ "$(podman inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" != 'true' ]; then + podman run \ + -d --restart=always -p "127.0.0.1:${reg_port}:${int_port}" --network bridge --name "${reg_name}" \ + registry:2 +fi + +# 2. Create kind cluster with containerd registry config dir enabled +# TODO: kind will eventually enable this by default and this patch will +# be unnecessary. +# +# See: +# https://github.com/kubernetes-sigs/kind/issues/2875 +# https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration +# See: https://github.com/containerd/containerd/blob/main/docs/hosts.md +cat <