Skip to content

Commit 92d4cac

Browse files
authored
Fix Windows support for 2019 (#47)
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 ef2c556 commit 92d4cac

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
@@ -97,12 +97,10 @@ os="$($kubectl get node $node -o jsonpath="{.metadata.labels.kubernetes\.io/os}"
9797

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

0 commit comments

Comments
 (0)