diff --git a/docker/sandbox/flyte-entrypoint-default.sh b/docker/sandbox/flyte-entrypoint-default.sh index ce1cc8a0c0..5b5c3ceb1d 100755 --- a/docker/sandbox/flyte-entrypoint-default.sh +++ b/docker/sandbox/flyte-entrypoint-default.sh @@ -6,7 +6,8 @@ trap 'pkill -P $$' EXIT # Start k3s echo "Starting k3s cluster..." -k3s server --no-deploy=traefik --no-deploy=servicelb --no-deploy=local-storage --no-deploy=metrics-server &> /var/log/k3s.log & +KUBERNETES_API_PORT=${KUBERNETES_API_PORT:-6443} +k3s server --no-deploy=traefik --no-deploy=servicelb --no-deploy=local-storage --no-deploy=metrics-server --https-listen-port=${KUBERNETES_API_PORT} &> /var/log/k3s.log & K3S_PID=$! timeout 600 sh -c "until k3s kubectl explain deployment &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the Kubernetes cluster to start"; exit 1 ) echo "Done." diff --git a/docker/sandbox/flyte-entrypoint-dind.sh b/docker/sandbox/flyte-entrypoint-dind.sh index 39b7d7ce48..9db5613c34 100755 --- a/docker/sandbox/flyte-entrypoint-dind.sh +++ b/docker/sandbox/flyte-entrypoint-dind.sh @@ -23,7 +23,8 @@ echo "Done." # Start k3s echo "Starting k3s cluster..." -k3s server --docker --no-deploy=traefik --no-deploy=servicelb --no-deploy=local-storage --no-deploy=metrics-server &> /var/log/k3s.log & +KUBERNETES_API_PORT=${KUBERNETES_API_PORT:-6443} +k3s server --docker --no-deploy=traefik --no-deploy=servicelb --no-deploy=local-storage --no-deploy=metrics-server --https-listen-port=${KUBERNETES_API_PORT} &> /var/log/k3s.log & K3S_PID=$! timeout 600 sh -c "until k3s kubectl explain deployment &> /dev/null; do sleep 1; done" || ( echo >&2 "Timed out while waiting for the Kubernetes cluster to start"; exit 1 ) echo "Done."