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:
parent
58a357d7d2
commit
b7c059151d
15
setup.sh
15
setup.sh
@ -43,11 +43,20 @@ echo "==> Waiting for nodes..."
|
|||||||
kubectl wait --for=condition=Ready nodes --all --timeout=180s
|
kubectl wait --for=condition=Ready nodes --all --timeout=180s
|
||||||
|
|
||||||
echo "==> Preloading images into the cluster (non-fatal if a pull fails)..."
|
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
|
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
|
if "$RT" pull -q "docker.io/library/$img" >/dev/null 2>&1; then
|
||||||
# podman stores the fully-qualified name; kind load accepts either
|
tarfile="$(mktemp)"
|
||||||
kind load docker-image --name cka-sim "docker.io/library/$img" >/dev/null 2>&1 \
|
if "$RT" save -o "$tarfile" "docker.io/library/$img" >/dev/null 2>&1 \
|
||||||
&& echo " loaded $img" || echo " warn: could not load $img"
|
&& 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
|
else
|
||||||
echo " warn: could not pull $img (tasks will pull at runtime)"
|
echo " warn: could not pull $img (tasks will pull at runtime)"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user