Skip to content

Commit 8c5c268

Browse files
committed
Fix Windows support for 2019
Switching Windows container image to mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 so that all Windows container versions are supported.
1 parent bfa4119 commit 8c5c268

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kubectl-node_shell

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ os="$($kubectl get node $node -o jsonpath="{.metadata.labels.kubernetes\.io/os}"
9494

9595
# Set pod configuration per operating system
9696
if [ "$os" = "windows" ]; then
97-
image="${KUBECTL_NODE_SHELL_IMAGE_WINDOWS:-mcr.microsoft.com/powershell}"
97+
image="${KUBECTL_NODE_SHELL_IMAGE_WINDOWS:-mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0}"
9898
name="pwsh"
9999
pod="${name}-$(env LC_ALL=C tr -dc a-z0-9 </dev/urandom | head -c 6)"
100-
# pwsh has to be launched via cmd.exe because of how containerd 1.6 handles the mount of the container filesystem
101-
# see https://kubernetes.io/docs/tasks/configure-pod-container/create-hostprocess-pod/#volume-mounts
102-
cmd_start='"cmd.exe", "/c", "%CONTAINER_SANDBOX_MOUNT_POINT%\\Program Files\\PowerShell\\latest\\pwsh.exe", "-nol", "-wd", "C:\\"'
100+
cmd_start='"cmd.exe", "/c", "powershell.exe", "-nol"'
103101
cmd_arg_prefix=', "-Command"'
104102
cmd_default=''
105103
security_context='{"privileged":true,"windowsOptions":{"hostProcess":true,"runAsUserName":"NT AUTHORITY\\SYSTEM"}}'

0 commit comments

Comments
 (0)