fix: use kind load image-archive instead of docker-image for podman

kind load docker-image shells out to the docker CLI internally
regardless of KIND_EXPERIMENTAL_PROVIDER, so it can't see images that
only exist in podman's store and fails when the docker socket isn't
reachable. Save each image with podman save and load the tar via
kind load image-archive, which is runtime-agnostic.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vumast3r 2026-09-12 10:17:36 -06:00
parent 58a357d7d2
commit b7c059151d

View File

@ -43,11 +43,20 @@ echo "==> Waiting for nodes..."
kubectl wait --for=condition=Ready nodes --all --timeout=180s
echo "==> Preloading images into the cluster (non-fatal if a pull fails)..."
# `kind load docker-image` shells out to the docker CLI internally no matter which
# provider the cluster uses, so it can't see images that only exist in podman's
# store. Save to a tar and use `kind load image-archive` instead, which is
# runtime-agnostic.
for img in nginx:1.25 nginx:1.27 busybox:1.36 redis:7-alpine; do
if "$RT" pull -q "docker.io/library/$img" >/dev/null 2>&1; then
# podman stores the fully-qualified name; kind load accepts either
kind load docker-image --name cka-sim "docker.io/library/$img" >/dev/null 2>&1 \
&& echo " loaded $img" || echo " warn: could not load $img"
tarfile="$(mktemp)"
if "$RT" save -o "$tarfile" "docker.io/library/$img" >/dev/null 2>&1 \
&& kind load image-archive --name cka-sim "$tarfile" >/dev/null 2>&1; then
echo " loaded $img"
else
echo " warn: could not load $img"
fi
rm -f "$tarfile"
else
echo " warn: could not pull $img (tasks will pull at runtime)"
fi