Skip to content

Commit 9ffe62a

Browse files
Reorganize steps by method and rewrite some windows steps.
1 parent 25d989a commit 9ffe62a

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

articles/aks/node-access.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ Complete these steps if you don't have an SSH key. Create an SSH key depending o
2626

2727
## Linux and macOS
2828

29-
### SSH to a Linux using kubectl
29+
Linux and macOS users can SSH to access their node using `kubectl debug` or their private IP Address. Windows users should skip to below for a workaround to SSH via proxy.
30+
31+
### SSH using kubectl debug
3032

3133
To create an interactive shell connection, use the `kubectl debug` command to run a privileged container on your node.
3234

@@ -59,14 +61,14 @@ To create an interactive shell connection, use the `kubectl debug` command to ru
5961
root@aks-nodepool1-37663765-vmss000000:/#
6062
```
6163
62-
This privileged container gives access to the node.
64+
You now have access to the node through a privileged container as a debugging pod.
6365
6466
> [!NOTE]
6567
> You can interact with the node session by running `chroot /host` from the privileged container.
6668
6769
### Exit kubectl debug mode
6870
69-
When you're done with a debugging pod, enter the `exit` command to end the interactive shell session. After the interactive container session closes, delete the pod used for access with `kubectl delete pod`.
71+
When you're done with your node, enter the `exit` command to end the interactive shell session. After the interactive container session closes, delete the debugging pod used with `kubectl delete pod`.
7072
7173
```bash
7274
kubectl delete pod node-debugger-aks-nodepool1-37663765-vmss000000-bkmmx
@@ -110,48 +112,54 @@ Sample output:
110112
aks-nodepool1-33555069-vmss000000 10.224.0.5,family:IPv4;
111113
```
112114

113-
2. SSH into the private IP address to access your node. You can also try [Azure Bastion][azure-bastion] to test connections to your virtual machines through the private IP address. Make sure that the Azure Bastion is hosted in the same virtual network as your VM.
115+
2. SSH using your private IP address to access your node.
114116

115117
```bash
116118
117119
```
118120

119-
## Windows Server node
121+
3. Optionally, you can test with Azure Bastion. Follow these steps to setup [Azure Bastion][azure-bastion] to test your connection to your virtual machines using a private IP address. Make sure that the Azure Bastion is hosted in the same virtual network as your VM.
122+
123+
## Windows Server proxy connection
120124

121-
### Connect with SSH
125+
Window Server node users only. Follow these steps as a workaround to connect with SSH.
122126

123-
At this time, you can't connect to a Windows Server node directly by using `kubectl debug`. Instead, you need to first connect to another node in the cluster, then connect to the Windows Server node from that node using SSH. Alternatively, you can [connect to Windows Server nodes using remote desktop protocol (RDP) connections][aks-windows-rdp] instead of using SSH or use SSH with 'machines API' presented at the start of this document.
127+
### Create a proxy server
124128

125-
To connect to another node in the cluster, use the `kubectl debug` command. For more information, see the Linux section.
129+
At this time, you can't connect to a Windows Server node directly by using `kubectl debug`. Instead, you need to first connect to another node in the cluster with `kubectl`, then connect to the Windows Server node from that node using SSH. Alternatively, you can connect to Windows Server nodes using [remote desktop protocol (RDP) connections][aks-windows-rdp] instead of using SSH or use SSH with 'machines API'.
130+
131+
To connect to another node in the cluster, use the `kubectl debug` command. For more information, follow the above steps in the kubectl section.
126132

127133
To create the SSH connection to the Windows Server node from another node, use the SSH keys provided when you created the AKS cluster and the internal IP address of the Windows Server node.
128134

129135
> [!IMPORTANT]
130136
>
131-
> The following steps for creating the SSH connection to the Windows Server node from another node can only be used if you created your AKS cluster using the Azure CLI and the `--generate-ssh-keys` parameter. AKS Update command can also be used to manage, create SSH keys on an existing AKS cluster. For more information refer [Manage SSH configuration][manage-ssh-node-access].
137+
> The following steps for creating the SSH connection to the Windows Server node from another node can only be used if you created your AKS cluster using the Azure CLI and the `--generate-ssh-keys` parameter. The AKS Update command can also be used to manage, create SSH keys on an existing AKS cluster. For more information refer to [manage SSH node access][manage-ssh-node-access].
138+
139+
Once you have followed the steps to use kubectl debug, come back to this.
132140

133141
1. Open a new terminal window and use the `kubectl get pods` command to get the name of the pod started by `kubectl debug`.
134142

135143
```bash
136144
kubectl get pods
137145
```
138146

139-
The following example resembles output from the command:
147+
Sample output:
140148

141149
```output
142150
NAME READY STATUS RESTARTS AGE
143151
node-debugger-aks-nodepool1-37663765-vmss000000-bkmmx 1/1 Running 0 21s
144152
```
145153

146-
In the previous example, *node-debugger-aks-nodepool1-37663765-vmss000000-bkmmx* is the name of the pod started by `kubectl debug`.
154+
In the sample output, *node-debugger-aks-nodepool1-37663765-vmss000000-bkmmx* is the name of the pod started by `kubectl debug`.
147155

148156
2. Use the `kubectl port-forward` command to open a connection to the deployed pod:
149157

150158
```bash
151159
kubectl port-forward node-debugger-aks-nodepool1-37663765-vmss000000-bkmmx 2022:22
152160
```
153161

154-
The following example resembles output from the command:
162+
Sample output:
155163

156164
```output
157165
Forwarding from 127.0.0.1:2022 -> 22
@@ -166,7 +174,7 @@ To create the SSH connection to the Windows Server node from another node, use t
166174
kubectl get no -o custom-columns=NAME:metadata.name,'INTERNAL_IP:status.addresses[?(@.type == \"InternalIP\")].address'
167175
```
168176

169-
The following example resembles output from the command:
177+
Sample output:
170178

171179
```output
172180
NAME INTERNAL_IP
@@ -181,7 +189,7 @@ To create the SSH connection to the Windows Server node from another node, use t
181189
ssh -o 'ProxyCommand ssh -p 2022 -W %h:%p [email protected]' [email protected]
182190
```
183191
184-
The following example resembles output from the command:
192+
Sample output:
185193
186194
```output
187195
The authenticity of host '10.224.0.62 (10.224.0.62)' can't be established.
@@ -207,7 +215,7 @@ To create the SSH connection to the Windows Server node from another node, use t
207215
208216
If you need more troubleshooting data, you can [view the kubelet logs][view-kubelet-logs] or [view the Kubernetes control plane logs][view-control-plane-logs].
209217
210-
See [Manage SSH configuration][manage-ssh-node-access] to learn about managing the SSH key on an AKS cluster or node pools.
218+
To learn about managing your SSH keys, see [Manage SSH configuration][manage-ssh-node-access].
211219
212220
<!-- INTERNAL LINKS -->
213221
[view-kubelet-logs]: kubelet-logs.md

0 commit comments

Comments
 (0)