Skip to content

Commit 31587eb

Browse files
committed
update ssh.md
1 parent 22bf625 commit 31587eb

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

articles/aks/ssh.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: SSH into Azure Kubernetes Service (AKS) cluster nodes
3-
description: Learn how to create an SSH connection with Azure Kubernetes Service (AKS) cluster nodes for troubleshooting and maintenance tasks.
2+
title: Connect to Azure Kubernetes Service (AKS) cluster nodes
3+
description: Learn how to connect to Azure Kubernetes Service (AKS) cluster nodes for troubleshooting and maintenance tasks.
44
services: container-service
55
ms.topic: article
6-
ms.date: 05/17/2021
6+
ms.date: 02/25/2022
77

88
ms.custom: contperf-fy21q4
99

10-
#Customer intent: As a cluster operator, I want to learn how to use SSH to connect to virtual machines in an AKS cluster to perform maintenance or troubleshoot a problem.
10+
#Customer intent: As a cluster operator, I want to learn how to connect to virtual machines in an AKS cluster to perform maintenance or troubleshoot a problem.
1111
---
1212

13-
# Connect with SSH to Azure Kubernetes Service (AKS) cluster nodes for maintenance or troubleshooting
13+
# Connect to Azure Kubernetes Service (AKS) cluster nodes for maintenance or troubleshooting
1414

15-
Throughout the lifecycle of your Azure Kubernetes Service (AKS) cluster, you may need to access an AKS node. This access could be for maintenance, log collection, or other troubleshooting operations. You can access AKS nodes using SSH, including Windows Server nodes. You can also [connect to Windows Server nodes using remote desktop protocol (RDP) connections][aks-windows-rdp]. For security purposes, the AKS nodes aren't exposed to the internet. To SSH to the AKS nodes, you use `kubectl debug` or the private IP address.
15+
Throughout the lifecycle of your Azure Kubernetes Service (AKS) cluster, you may need to access an AKS node. This access could be for maintenance, log collection, or other troubleshooting operations. You can access AKS nodes using SSH, including Windows Server nodes. You can also [connect to Windows Server nodes using remote desktop protocol (RDP) connections][aks-windows-rdp]. For security purposes, the AKS nodes aren't exposed to the internet. To connect to the AKS nodes, you use `kubectl debug` or the private IP address.
1616

17-
This article shows you how to create an SSH connection with an AKS node.
17+
This article shows you how to create a connection to an AKS node.
1818

1919
## Before you begin
2020

@@ -24,9 +24,9 @@ This article also assumes you have an SSH key. You can create an SSH key using [
2424

2525
You also need the Azure CLI version 2.0.64 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
2626

27-
## Create the SSH connection to a Linux node
27+
## Create an interactive shell connection to a Linux node
2828

29-
To create an SSH connection to an AKS node, use `kubectl debug` to run a privileged container on your node. To list your nodes, use `kubectl get nodes`:
29+
To create an interactive shell connection to a Linux node, use `kubectl debug` to run a privileged container on your node. To list your nodes, use `kubectl get nodes`:
3030

3131
```output
3232
$ kubectl get nodes -o wide
@@ -40,13 +40,13 @@ aksnpwin000000 Ready agent 87s v1.19.9 10.240.0.
4040
Use `kubectl debug` to run a container image on the node to connect to it.
4141

4242
```azurecli-interactive
43-
kubectl debug node/aks-nodepool1-12345678-vmss000000 -it --image=mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11
43+
kubectl debug node/aks-nodepool1-12345678-vmss000000 -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0
4444
```
4545

46-
This command starts a privileged container on your node and connects to it over SSH.
46+
This command starts a privileged container on your node and connects to it.
4747

4848
```output
49-
$ kubectl debug node/aks-nodepool1-12345678-vmss000000 -it --image=mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.11
49+
$ kubectl debug node/aks-nodepool1-12345678-vmss000000 -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0
5050
Creating debugging pod node-debugger-aks-nodepool1-12345678-vmss000000-bkmmx with container debugger on node aks-nodepool1-12345678-vmss000000.
5151
If you don't see a command prompt, try pressing enter.
5252
root@aks-nodepool1-12345678-vmss000000:/#
@@ -59,9 +59,9 @@ This privileged container gives access to the node.
5959
6060
## Create the SSH connection to a Windows node
6161

62-
At this time, you can't connect to a Windows Server node using SSH 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.
62+
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.
6363

64-
To connect to another node in the cluster, use `kubectl debug`. For more information, see [Create the SSH connection to a Linux node][ssh-linux-kubectl-debug].
64+
To connect to another node in the cluster, use `kubectl debug`. For more information, see [Create an interactive shell connection to a Linux node][ssh-linux-kubectl-debug].
6565

6666
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.
6767

@@ -127,7 +127,11 @@ The above example connects to port 22 on the Windows Server node through port 20
127127
128128
## Remove SSH access
129129
130-
When done, `exit` the SSH session, stop any port forwarding, and then `exit` the interactive container session. After the interactive container session closes, the pod used for SSH access from the AKS cluster is deleted.
130+
When done, `exit` the SSH session, stop any port forwarding, and then `exit` the interactive container session. After the interactive container session closes, delete the pod used for access with `kubectl delete pod`
131+
132+
```output
133+
kubectl delete pod node-debugger-aks-nodepool1-12345678-vmss000000-bkmmx
134+
```
131135
132136
## Next steps
133137

@@ -143,4 +147,4 @@ If you need more troubleshooting data, you can [view the kubelet logs][view-kube
143147
[aks-windows-rdp]: rdp.md
144148
[ssh-nix]: ../virtual-machines/linux/mac-create-ssh-keys.md
145149
[ssh-windows]: ../virtual-machines/linux/ssh-from-windows.md
146-
[ssh-linux-kubectl-debug]: #create-the-ssh-connection-to-a-linux-node
150+
[ssh-linux-kubectl-debug]: #create-an-interactive-shell-connection-to-a-linux-node

0 commit comments

Comments
 (0)