diff --git a/kind/registry.sh b/kind/registry.sh index 5752d17b..eb752111 100755 --- a/kind/registry.sh +++ b/kind/registry.sh @@ -403,12 +403,16 @@ function define_runtime_commands() { case "$OSTYPE" in "linux-gnu"*) DOCKER_RESTART_COMMAND="sudo systemctl restart docker" - if [ "${ROOTLESS_CONTAINERS}" == 'y' ]; then - CRI_COMMAND="podman" - export KIND_EXPERIMENTAL_PROVIDER=podman - else - CRI_COMMAND="sudo podman" - KIND_COMMAND="sudo --preserve-env kind" + if [ "${CRI_PROVIDER}" == 'podman' ]; then + if [ "${ROOTLESS_CONTAINERS}" == 'y' ]; then + CRI_COMMAND="podman" + export KIND_EXPERIMENTAL_PROVIDER=podman + else + CRI_COMMAND="sudo podman" + KIND_COMMAND="sudo --preserve-env kind" + fi + elif [ "${CRI_PROVIDER}" == 'docker' ]; then + CRI_COMMAND="docker" fi ;; "darwin"*)