Skip to content

Commit 742f213

Browse files
authored
Merge pull request #215537 from CocoWang-wql/patch-22
Update node-access.md
2 parents dc0a457 + 091e919 commit 742f213

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

articles/aks/node-access.md

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Connect to Azure Kubernetes Service (AKS) cluster nodes
33
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: 10/20/2022
6+
ms.date: 11/1/2022
77

88
ms.custom: contperf-fy21q4
99

@@ -12,9 +12,9 @@ ms.custom: contperf-fy21q4
1212

1313
# 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 connect 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 might need to access an AKS node. This access could be for maintenance, log collection, or troubleshooting operations. You can securely authenticate against AKS Linux and Windows nodes using SSH, and you can also [connect to Windows Server nodes using remote desktop protocol (RDP)][aks-windows-rdp]. For security reasons, 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 a connection to an AKS node.
17+
This article shows you how to create a connection to an AKS node and update the SSH key on an existing AKS cluster.
1818

1919
## Before you begin
2020

@@ -163,6 +163,37 @@ When done, `exit` the SSH session, stop any port forwarding, and then `exit` the
163163
kubectl delete pod node-debugger-aks-nodepool1-12345678-vmss000000-bkmmx
164164
```
165165
166+
## Update SSH key on an existing AKS cluster (preview)
167+
168+
### Prerequisites
169+
* Before you start, ensure the Azure CLI is installed and configured. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
170+
* The aks-preview extension version 0.5.111 or later. To learn how to install an Azure extension, see [How to install extensions][how-to-install-azure-extensions].
171+
172+
> [!NOTE]
173+
> Updating of the SSH key is supported on Azure virtual machine scale sets with AKS clusters.
174+
175+
Use the [az aks update][az-aks-update] command to update the SSH key on the cluster. This operation will update the key on all node pools. You can either specify the key or a key file using the `--ssh-key-value` argument.
176+
177+
```azurecli
178+
az aks update --name myAKSCluster --resource-group MyResourceGroup --ssh-key-value <new SSH key value or SSH key file>
179+
```
180+
181+
Examples:
182+
In the following example, you can specify the new SSH key value for the `--ssh-key-value` argument.
183+
184+
```azurecli
185+
az aks update --name myAKSCluster --resource-group MyResourceGroup --ssh-key-value 'ssh-rsa AAAAB3Nza-xxx'
186+
```
187+
188+
In the following example, you specify a SSH key file.
189+
190+
```azurecli
191+
az aks update --name myAKSCluster --resource-group MyResourceGroup --ssh-key-value .ssh/id_rsa.pub
192+
```
193+
194+
> [!IMPORTANT]
195+
> During this operation, all virtual machine scale set instances are upgraded and re-imaged to use the new SSH key.
196+
166197
## Next steps
167198

168199
If you need more troubleshooting data, you can [view the kubelet logs][view-kubelet-logs] or [view the Kubernetes master node logs][view-master-logs].
@@ -174,4 +205,8 @@ If you need more troubleshooting data, you can [view the kubelet logs][view-kube
174205
[aks-windows-rdp]: rdp.md
175206
[ssh-nix]: ../virtual-machines/linux/mac-create-ssh-keys.md
176207
[ssh-windows]: ../virtual-machines/linux/ssh-from-windows.md
177-
[ssh-linux-kubectl-debug]: #create-an-interactive-shell-connection-to-a-linux-node
208+
[ssh-linux-kubectl-debug]: #create-an-interactive-shell-connection-to-a-linux-node
209+
[az-aks-update]: /cli/azure/aks#az-aks-update
210+
[how-to-install-azure-extensions]: /cli/azure/azure-cli-extensions-overview#how-to-install-extensions
211+
212+

0 commit comments

Comments
 (0)