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
+23-36Lines changed: 23 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create a private Azure Kubernetes Service cluster
3
3
description: Learn how to create a private Azure Kubernetes Service (AKS) cluster
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 8/30/2021
6
+
ms.date: 11/30/2021
7
7
8
8
---
9
9
@@ -13,6 +13,10 @@ In a private cluster, the control plane or API server has internal IP addresses
13
13
14
14
The control plane or API server is in an Azure Kubernetes Service (AKS)-managed Azure subscription. A customer's cluster or node pool is in the customer's subscription. The server and the cluster or node pool can communicate with each other through the [Azure Private Link service][private-link-service] in the API server virtual network and a private endpoint that's exposed in the subnet of the customer's AKS cluster.
15
15
16
+
When you provision a private AKS cluster, AKS by default creates a private FQDN with a private DNS zone and an additional public FQDN with a corresponding A record in Azure public DNS. The agent nodes still use the A record in the private DNS zone to resolve the private IP address of the private endpoint for communication to the API server.
Private cluster is available in public regions, Azure Government, and Azure China 21Vianet regions where [AKS is supported](https://azure.microsoft.com/global-infrastructure/services/?products=kubernetes-service).
@@ -22,22 +26,11 @@ Private cluster is available in public regions, Azure Government, and Azure Chin
22
26
23
27
## Prerequisites
24
28
25
-
* The Azure CLI version 2.2.0 or later
29
+
* Azure CLI >= 2.28.0 or Azure CLI with aks-preview extension 0.5.29 or later.
30
+
* If using ARM or the rest API, the AKS API version must be 2021-05-01 or later.
26
31
* The Private Link service is supported on Standard Azure Load Balancer only. Basic Azure Load Balancer isn't supported.
27
32
* To use a custom DNS server, add the Azure DNS IP 168.63.129.16 as the upstream DNS server in the custom DNS server.
28
33
29
-
### Install the `aks-preview` Azure CLI
30
-
31
-
You need the *aks-preview* Azure CLI extension. Install the *aks-preview* Azure CLI extension by using the [az extension add][az-extension-add] command. Or install any available updates by using the [az extension update][az-extension-update] command.
32
-
33
-
```azurecli-interactive
34
-
# Install the aks-preview extension
35
-
az extension add --name aks-preview
36
-
37
-
# Update the extension to make sure you have the latest version installed
38
-
az extension update --name aks-preview
39
-
```
40
-
41
34
## Create a private AKS cluster
42
35
43
36
### Create a resource group
@@ -74,6 +67,22 @@ Where `--enable-private-cluster` is a mandatory flag for a private cluster.
74
67
> [!NOTE]
75
68
> If the Docker bridge address CIDR (172.17.0.1/16) clashes with the subnet CIDR, change the Docker bridge address appropriately.
76
69
70
+
## Disable Public FQDN
71
+
72
+
The following parameters can be leveraged to disable Public FQDN.
73
+
74
+
### Disable Public FQDN on a new AKS cluster
75
+
76
+
```azurecli-interactive
77
+
az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --load-balancer-sku standard --enable-private-cluster --enable-managed-identity --assign-identity <ResourceId> --private-dns-zone <private-dns-zone-mode> --disable-public-fqdn
78
+
```
79
+
80
+
### Disable Public FQDN on an existing cluster
81
+
82
+
```azurecli-interactive
83
+
az aks update -n <private-cluster-name> -g <private-cluster-resource-group> --disable-public-fqdn
84
+
```
85
+
77
86
## Configure Private DNS Zone
78
87
79
88
The following parameters can be leveraged to configure Private DNS Zone.
@@ -150,28 +159,6 @@ az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --lo
150
159
az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --load-balancer-sku standard --enable-private-cluster --enable-managed-identity --assign-identity <ResourceId> --private-dns-zone <custom private dns zone ResourceId> --fqdn-subdomain <subdomain>
151
160
```
152
161
153
-
### Create a private AKS cluster with a Public FQDN
154
-
155
-
Prerequisites:
156
-
157
-
* Azure CLI >= 2.28.0 or Azure CLI with aks-preview extension 0.5.29 or later.
158
-
* If using ARM or the rest API, the AKS API version must be 2021-05-01 or later.
159
-
160
-
The Public DNS option can be leveraged to simplify routing options for your Private Cluster.
1. When you provision a private AKS cluster, AKS by default creates an additional public FQDN and corresponding A record in Azure public DNS. The agent nodes still use the A record in the private DNS zone to resolve the private IP address of the private endpoint for communication to the API server.
165
-
166
-
2. If you use `--private-dns-zone none`, the cluster will only have a public FQDN. When using this option, no Private DNS Zone is created or used for the name resolution of the FQDN of the API Server. The IP of the API is still private and not publicly routable.
167
-
168
-
3. If the public FQDN is not desired, you could use `--disable-public-fqdn` to disable it ("none" private dns zone is not allowed to disable public FQDN).
169
-
170
-
```azurecli-interactive
171
-
az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --load-balancer-sku standard --enable-private-cluster --enable-managed-identity --assign-identity <ResourceId> --private-dns-zone <private-dns-zone-mode> --disable-public-fqdn
172
-
az aks update -n <private-cluster-name> -g <private-cluster-resource-group> --disable-public-fqdn
173
-
```
174
-
175
162
## Options for connecting to the private cluster
176
163
177
164
The API server endpoint has no public IP address. To manage the API server, you'll 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.
0 commit comments