@@ -37,9 +37,9 @@ To create an interactive shell connection, use the `kubectl debug` command to ru
37
37
``` bash
38
38
kubectl get nodes -o wide
39
39
```
40
-
40
+
41
41
Sample output:
42
-
42
+
43
43
` ` ` output
44
44
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE
45
45
aks-nodepool1-37663765-vmss000000 Ready agent 166m v1.25.6 10.224.0.33 < none> Ubuntu 22.04.2 LTS
@@ -60,9 +60,9 @@ To create an interactive shell connection, use the `kubectl debug` command to ru
60
60
If you don' t see a command prompt, try pressing enter.
61
61
root@aks-nodepool1-37663765-vmss000000:/#
62
62
```
63
-
63
+
64
64
You now have access to the node through a privileged container as a debugging pod.
65
-
65
+
66
66
> [!NOTE]
67
67
> You can interact with the node session by running `chroot /host` from the privileged container.
68
68
@@ -84,39 +84,37 @@ For convenience, the nodepools are exposed when the node has a public IP assigne
84
84
85
85
1 . To get the private IP, use the ` machine list ` to show all your VMs.
86
86
87
- ``` bash
88
- az aks machine list --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name nodepool1 -o table
89
-
90
- ```
91
-
92
- Sample output:
93
-
94
- ``` output
95
- Name Ip
96
- --------------------------------- --------------------------
97
- aks-nodepool1-33555069-vmss000000 10.224.0.5,family:IPv4;
98
- aks-nodepool1-33555069-vmss000001 10.224.0.6,family:IPv4;
99
- aks-nodepool1-33555069-vmss000002 10.224.0.4,family:IPv4;
100
- ```
101
- To target a specific node inside the nodepool, add a ` --machine-name ` flag:
87
+ ``` bash
88
+ az aks machine list --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name nodepool1 -o table
89
+ ```
102
90
103
- ``` bash
104
- az aks machine show --cluster-name myAKScluster --nodepool-name nodepool1 -g myResourceGroup --machine-name aks-nodepool1-33555069-vmss000000 -o table
105
-
106
- ```
107
- Sample output:
91
+ Sample output:
108
92
109
- ``` output
110
- Name Ip
111
- --------------------------------- --------------------------
112
- aks-nodepool1-33555069-vmss000000 10.224.0.5,family:IPv4;
113
- ```
93
+ ` ` ` output
94
+ Name Ip
95
+ --------------------------------- --------------------------
96
+ aks-nodepool1-33555069-vmss000000 10.224.0.5,family:IPv4;
97
+ aks-nodepool1-33555069-vmss000001 10.224.0.6,family:IPv4;
98
+ aks-nodepool1-33555069-vmss000002 10.224.0.4,family:IPv4;
99
+ ` ` `
100
+ To target a specific node inside the nodepool, add a ` --machine-name` flag:
101
+
102
+ ` ` ` bash
103
+ az aks machine show --cluster-name myAKScluster --nodepool-name nodepool1 -g myResourceGroup --machine-name aks-nodepool1-33555069-vmss000000 -o table
104
+ ` ` `
105
+ Sample output:
106
+
107
+ ` ` ` output
108
+ Name Ip
109
+ --------------------------------- --------------------------
110
+ aks-nodepool1-33555069-vmss000000 10.224.0.5,family:IPv4;
111
+ ` ` `
114
112
115
113
2. SSH using your private IP address to access your node.
116
114
117
- ``` bash
118
-
119
- ```
115
+ ` ` ` bash
116
+
117
+ ` ` `
120
118
121
119
3. Optionally, you can test with Azure Bastion. Follow these steps to set up [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
120
0 commit comments