diff --git a/scripts/shared/lib/clusters_kind b/scripts/shared/lib/clusters_kind index 953d5da5..48c69032 100755 --- a/scripts/shared/lib/clusters_kind +++ b/scripts/shared/lib/clusters_kind @@ -139,6 +139,7 @@ function provider_create_cluster() { cat "${RESOURCES_DIR}/${cluster}-config.yaml" kind create cluster ${image_flag:+"$image_flag"} --name="${cluster}" --config="${RESOURCES_DIR}/${cluster}-config.yaml" kind_fixup_config + kind_configure_registry "${cluster}" [[ "$LOAD_BALANCER" != true ]] || delete_cluster_on_fail deploy_load_balancer [[ "$AIR_GAPPED" != true ]] || air_gap_iptables @@ -232,6 +233,28 @@ function run_local_registry() { fi } +function kind_configure_registry() { + local cluster="$1" + REGISTRY_DIR="/etc/containerd/certs.d/localhost:5000" + for node in $(kind --name="${cluster}" get nodes); do + docker exec "${node}" mkdir -p "${REGISTRY_DIR}" + docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml" <