Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Add manual steps for powershell remoting. Workaround for #3460 (#3461)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickLang authored and Cecile Robert-Michon committed Jul 12, 2018
1 parent a4ec151 commit 111226b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
43 changes: 39 additions & 4 deletions docs/kubernetes/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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 <masternode>.<region>.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
Expand Down
2 changes: 1 addition & 1 deletion docs/kubernetes/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 111226b

Please sign in to comment.