diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index ff4084b7f59..49fd5425981 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -88,13 +88,13 @@ function set-linux-node-image() { function set-windows-node-image() { WINDOWS_NODE_IMAGE_PROJECT="windows-cloud" if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then - WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-v20210112" + WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-v20210413" elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then - WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-v20210112" + WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-v20210413" elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2004" ]]; then - WINDOWS_NODE_IMAGE="windows-server-2004-dc-core-v20210112" + WINDOWS_NODE_IMAGE="windows-server-2004-dc-core-v20210413" elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION,,}" == "win20h2" ]]; then - WINDOWS_NODE_IMAGE="windows-server-20h2-dc-core-v20210112" + WINDOWS_NODE_IMAGE="windows-server-20h2-dc-core-v20210413" else echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2 exit 1 diff --git a/cluster/gce/windows/configure.ps1 b/cluster/gce/windows/configure.ps1 index 25ecfa57357..41cf672ab83 100644 --- a/cluster/gce/windows/configure.ps1 +++ b/cluster/gce/windows/configure.ps1 @@ -126,19 +126,25 @@ try { exit 0 } - if (-not (Test-DockerIsInstalled)) { - Install-Docker - } - # For some reason the docker service may not be started automatically on the - # first reboot, although it seems to work fine on subsequent reboots. - Restart-Service docker - Start-Sleep 5 - if (-not (Test-DockerIsRunning)) { - throw "docker service failed to start or stay running" + $kube_env = Fetch-KubeEnv + Set-EnvironmentVars + + # Install Docker if the select CRI is not containerd and docker is not already + # installed. + if (${env:CONTAINER_RUNTIME} -ne "containerd") { + if (-not (Test-DockerIsInstalled)) { + Install-Docker + } + # For some reason the docker service may not be started automatically on the + # first reboot, although it seems to work fine on subsequent reboots. + Restart-Service docker + Start-Sleep 5 + if (-not (Test-DockerIsRunning)) { + throw "docker service failed to start or stay running" + } } Set-PrerequisiteOptions - $kube_env = Fetch-KubeEnv if (Test-IsTestCluster $kube_env) { Log-Output 'Test cluster detected, installing OpenSSH.' @@ -147,7 +153,6 @@ try { StartProcess-WriteSshKeys } - Set-EnvironmentVars Create-Directories Download-HelperScripts