Skip to content

Commit 4721507

Browse files
authored
Merge pull request #106463 from mlearned/mdl-1671635-private-cluster-bastion-section
Mdl 1671635 private cluster bastion section
2 parents 66bec46 + f35e2bd commit 4721507

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

articles/aks/private-clusters.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ az provider register --namespace Microsoft.Network
9696
```
9797
## Create a private AKS cluster
9898

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+
99107
### Default basic networking
100108

101109
```azurecli-interactive
@@ -122,35 +130,29 @@ Where *--enable-private-cluster* is a mandatory flag for a private cluster.
122130
> [!NOTE]
123131
> If the Docker bridge address CIDR (172.17.0.1/16) clashes with the subnet CIDR, change the Docker bridge address appropriately.
124132
125-
## Connect to the private cluster
133+
## Options for connecting to the private cluster
126134

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.
128136

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.
130140

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.
134142

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
138144

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.
140146

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].
154156

155157
## Dependencies
156158
* 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
175177
[az-feature-list]: /cli/azure/feature?view=azure-cli-latest#az-feature-list
176178
[az-extension-add]: /cli/azure/extension#az-extension-add
177179
[az-extension-update]: /cli/azure/extension#az-extension-update
178-
[private-link-service]: https://docs.microsoft.com/azure/private-link/private-link-service-overview
180+
[private-link-service]: /private-link/private-link-service-overview
179181
[virtual-network-peering]: ../virtual-network/virtual-network-peering-overview.md
182+
[azure-bastion]: ../bastion/bastion-create-host-portal.md
183+
[express-route-or-vpn]: ../expressroute/expressroute-about-virtual-network-gateways.md
180184

0 commit comments

Comments
 (0)