From 9c12ed23b1b4367e104b8f17a34260a6a2d1033f Mon Sep 17 00:00:00 2001 From: Patrick Lang Date: Wed, 11 Jul 2018 12:02:11 -0700 Subject: [PATCH] Add manual steps for powershell remoting. Workaround for #3460 --- docs/kubernetes/troubleshooting.md | 43 +++++++++++++++++++++++++++--- docs/kubernetes/windows.md | 2 +- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/docs/kubernetes/troubleshooting.md b/docs/kubernetes/troubleshooting.md index f0b582966b..fa5577d994 100644 --- a/docs/kubernetes/troubleshooting.md +++ b/docs/kubernetes/troubleshooting.md @@ -64,7 +64,17 @@ There are two symptoms where you may need to debug Custom Script Extension error - VMExtensionProvisioningError or VMExtensionProvisioningTimeout - `kubectl node` doesn't list the Windows node(s) -To get more logs, you need to connect to the Windows nodes using Remote Desktop. Since the nodes are on a private IP range, you will need to use SSH local port forwarding from a master node. +To get more logs, you need to connect to the Windows nodes using Remote Desktop - see [Connecting to Windows Nodes](#connecting-to-windows-nodes) + +Once connected, check the following logs for errors: + + - `c:\Azure\CustomDataSetupScript.log` + +#### Connecting to Windows nodes + +Since the nodes are on a private IP range, you will need to use SSH local port forwarding from a master node to the Windows node to use remote. + + 1. Get the IP of the Windows node with `az vm list` and `az vm show` @@ -85,10 +95,35 @@ To get more logs, you need to connect to the Windows nodes using Remote Desktop. 2. Forward a local port to the Windows port 3389, such as `ssh -L 5500:10.240.0.4:3389 ..cloudapp.azure.com` 3. Run `mstsc.exe /v:localhost:5500` -Once connected, check the following logs for errors: - - - `c:\Azure\CustomDataSetupScript.log` +Now, you can use the default CMD window or install other tools as needed with the GUI. If you would like to enable PowerShell remoting, continue on to step 4. +4. Ansible uses PowerShell remoting over HTTPS, and has a convenient script to enable it. Run `PowerShell` on the Windows node, then these two steps to enable remoting. + +``` +Start-BitsTransfer https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 +.\ConfigureRemotingForAnsible.ps1 +``` + +5. Now, you're ready to connect from the Linux master to the Windows node: + +``` +$ docker run -it mcr.microsoft.com/powershell +PowerShell v6.0.2 +Copyright (c) Microsoft Corporation. All rights reserved. + +https://aka.ms/pscore6-docs +Type 'help' to get help. + +PS /> $cred = Get-Credential + +PowerShell credential request +Enter your credentials. +User: azureuser +Password for user azureuser: ************ + +PS /> Enter-PSSession 20143k8s9000 -Credential $cred -Authentication Basic -UseSSL +[20143k8s9000]: PS C:\Users\azureuser\Documents> +``` ## Windows kubelet & CNI errors diff --git a/docs/kubernetes/windows.md b/docs/kubernetes/windows.md index 82ca710c98..1929c3a1a1 100644 --- a/docs/kubernetes/windows.md +++ b/docs/kubernetes/windows.md @@ -304,7 +304,7 @@ Windows support is still in active development with many changes each week. Read ### Finding logs -To connect to a Windows node using Remote Desktop and get logs, please read over this topic in the main [troubleshooting](troubleshooting.md#how-to-debug-cse-errors-windows) page first. +To connect to a Windows node using Remote Desktop and get logs, please read over this topic in the main [troubleshooting](troubleshooting.md#connecting-to-windows-nodes) page first. ### Checking versions