You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/private-clusters.md
+28-24Lines changed: 28 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,14 @@ az provider register --namespace Microsoft.Network
96
96
```
97
97
## Create a private AKS cluster
98
98
99
+
### Create a resource group
100
+
101
+
Create a resource group or use an existing resource group for your AKS cluster.
102
+
103
+
```azurecli-interactive
104
+
az group create -l westus -n MyResourceGroup
105
+
```
106
+
99
107
### Default basic networking
100
108
101
109
```azurecli-interactive
@@ -122,35 +130,29 @@ Where *--enable-private-cluster* is a mandatory flag for a private cluster.
122
130
> [!NOTE]
123
131
> If the Docker bridge address CIDR (172.17.0.1/16) clashes with the subnet CIDR, change the Docker bridge address appropriately.
124
132
125
-
## Connect to the private cluster
133
+
## Options for connecting to the private cluster
126
134
127
-
The API server endpoint has no public IP address. Consequently, you must create an Azure virtual machine (VM) in a virtual network and connect to the API server. To do so, do the following:
135
+
The API server endpoint has no public IP address. To manage the API server, you will need to use a VM that has access to the AKS cluster's Azure Virtual Network (VNet). There are several options for establishing network connectivity to the private cluster.
128
136
129
-
1. Get credentials to connect to the cluster.
137
+
* Create a VM in the same Azure Virtual Network (VNet) as the AKS cluster.
138
+
* Use a VM in a separate network and set up [Virtual network peering][virtual-network-peering]. See the section below for more information on this option.
139
+
* Use an [Express Route or VPN][express-route-or-VPN] connection.
130
140
131
-
```azurecli-interactive
132
-
az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup
133
-
```
141
+
Creating a VM in the same VNET as the AKS cluster is the easiest option. Express Route and VPNs add costs and require additional networking complexity. Virtual network peering requires you to plan your network CIDR ranges to ensure there are no overlapping ranges.
134
142
135
-
1. Do either of the following:
136
-
* Create a VM in the same virtual network as the AKS cluster.
137
-
* Create a VM in a different virtual network, and peer this virtual network with the AKS cluster virtual network.
143
+
## Virtual network peering
138
144
139
-
If you create a VM in a different virtual network, set up a link between this virtual network and the private DNS zone. To do so:
145
+
As mentioned, VNet peering is one way to access your private cluster. To use VNet peering you need to set up a link between virtual network and the private DNS zone.
140
146
141
-
a. Go to the MC_* resource group in the Azure portal.
142
-
b. Select the private DNS zone.
143
-
c. In the left pane, select the **Virtual network** link.
144
-
d. Create a new link to add the virtual network of the VM to the private DNS zone. It takes a few minutes for the DNS zone link to become available.
145
-
e. Go back to the MC_* resource group in the Azure portal.
146
-
f. In the right pane, select the virtual network. The virtual network name is in the form *aks-vnet-\**.
147
-
g. In the left pane, select **Peerings**.
148
-
h. Select **Add**, add the virtual network of the VM, and then create the peering.
149
-
i. Go to the virtual network where you have the VM, select **Peerings**, select the AKS virtual network, and then create the peering. If the address ranges on the AKS virtual network and the VM's virtual network clash, peering fails. For more information, see [Virtual network peering][virtual-network-peering].
150
-
151
-
1. Access the VM via Secure Shell (SSH).
152
-
1. Install the Kubectl tool, and run the Kubectl commands.
153
-
147
+
1. Go to the MC_* resource group in the Azure portal.
148
+
2. Select the private DNS zone.
149
+
3. In the left pane, select the **Virtual network** link.
150
+
4. Create a new link to add the virtual network of the VM to the private DNS zone. It takes a few minutes for the DNS zone link to become available.
151
+
5. Go back to the MC_* resource group in the Azure portal.
152
+
6. In the right pane, select the virtual network. The virtual network name is in the form *aks-vnet-\**.
153
+
7. In the left pane, select **Peerings**.
154
+
8. Select **Add**, add the virtual network of the VM, and then create the peering.
155
+
9. Go to the virtual network where you have the VM, select **Peerings**, select the AKS virtual network, and then create the peering. If the address ranges on the AKS virtual network and the VM's virtual network clash, peering fails. For more information, see [Virtual network peering][virtual-network-peering].
154
156
155
157
## Dependencies
156
158
* The Private Link service is supported on Standard Azure Load Balancer only. Basic Azure Load Balancer isn't supported.
@@ -175,6 +177,8 @@ The API server endpoint has no public IP address. Consequently, you must create
0 commit comments