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/api-server-vnet-integration.md
+72-14Lines changed: 72 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: API Server VNet Integration in Azure Kubernetes Service (AKS)
3
3
description: Learn how to create an Azure Kubernetes Service (AKS) cluster with API Server VNet Integration
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 06/27/2022
6
+
ms.date: 09/09/2022
7
7
ms.custom: references_regions
8
8
9
9
---
@@ -12,29 +12,26 @@ ms.custom: references_regions
12
12
13
13
An Azure Kubernetes Service (AKS) cluster with API Server VNet Integration configured projects the API server endpoint directly into a delegated subnet in the VNet where AKS is deployed. This enables network communication between the API server and the cluster nodes without any required private link or tunnel. The API server will be available behind an Internal Load Balancer VIP in the delegated subnet, which the nodes will be configured to utilize. By using API Server VNet Integration, you can ensure network traffic between your API server and your node pools remains on the private network only.
14
14
15
-
16
-
17
15
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
18
16
19
17
## API server connectivity
20
18
21
19
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 virtual machines that make up the cluster nodes can communicate with each other through the API server VIP and pod IPs that are projected into the delegated subnet.
22
20
23
-
At this time, API Server VNet integration is only supported for private clusters. Unlike standard public clusters, the agent nodes communicate directly with the private IP address of the ILB VIP for communication to the API server without using DNS. External clients needing to communicate with the cluster should follow the same private DNS setup methodology as standard [private clusters](private-clusters.md).
21
+
API Server VNet Integration is supported for public or private clusters, and public access can be added or removed after cluster provisioning. Unlike non-VNet integrated clusters, the agent nodes always communicate directly with the private IP address of the API Server Internal Load Balancer (ILB) IP without using DNS. All node to API server traffic is kept on private networking and no tunnel is required for API server to node connectivity. Out-of-cluster clients needing to communicate with the API server can do so normally if public network access is enabled. If public network access is disabled, they should follow the same private DNS setup methodology as standard [private clusters](private-clusters.md).
24
22
25
23
## Region availability
26
24
27
25
API Server VNet Integration is available in the following regions at this time:
28
26
29
-
- canary regions
30
27
- eastus2
31
28
- northcentralus
32
29
- westcentralus
33
30
- westus2
34
31
35
32
## Prerequisites
36
33
37
-
* Azure CLI with aks-preview extension 0.5.67 or later.
34
+
* Azure CLI with aks-preview extension 0.5.97 or later.
38
35
* If using ARM or the REST API, the AKS API version must be 2022-04-02-preview or later.
39
36
40
37
### Install the aks-preview CLI extension
@@ -69,9 +66,9 @@ When the feature has been registered, refresh the registration of the *Microsoft
69
66
az provider register --namespace Microsoft.ContainerService
70
67
```
71
68
72
-
## Create an AKS Private cluster with API Server VNet Integration using Managed VNet
69
+
## Create an AKS cluster with API Server VNet Integration using Managed VNet
73
70
74
-
AKS clusters with API Server VNet Integration can be configured in either managed VNet or bring-your-own VNet mode.
71
+
AKS clusters with API Server VNet Integration can be configured in either managed VNet or bring-your-own VNet mode. They can be created as either public clusters (with API server access available via a public IP) or private clusters (where the API server is only accessible via private VNet connectivity), and can be toggled between these two states without redeploying.
75
72
76
73
### Create a resource group
77
74
@@ -81,7 +78,19 @@ Create a resource group or use an existing resource group for your AKS cluster.
81
78
az group create -l westus2 -n <resource-group>
82
79
```
83
80
84
-
### Deploy the cluster
81
+
### Deploy a public cluster
82
+
83
+
```azurecli-interactive
84
+
az aks create -n <cluster-name> \
85
+
-g <resource-group> \
86
+
-l <location> \
87
+
--network-plugin azure \
88
+
--enable-apiserver-vnet-integration
89
+
```
90
+
91
+
The `--enable-apiserver-vnet-integration` flag configures API Server VNet integration for Managed VNet mode.
92
+
93
+
### Deploy a private cluster
85
94
86
95
```azurecli-interactive
87
96
az aks create -n <cluster-name> \
@@ -92,7 +101,7 @@ az aks create -n <cluster-name> \
92
101
--enable-apiserver-vnet-integration
93
102
```
94
103
95
-
Where`--enable-private-cluster` is a mandatory flag for a private cluster, and `--enable-apiserver-vnet-integration` configures API Server VNet integration for Managed VNet mode.
104
+
The`--enable-private-cluster`flag is mandatory for a private cluster, and `--enable-apiserver-vnet-integration` configures API Server VNet integration for Managed VNet mode.
96
105
97
106
## Create an AKS Private cluster with API Server VNet Integration using bring-your-own VNet
98
107
@@ -148,7 +157,20 @@ az role assignment create --scope <cluster-subnet-resource-id> \
@@ -162,9 +184,45 @@ az aks create -n <cluster-name> \
162
184
--assign-identity <managed-identity-resource-id>
163
185
```
164
186
165
-
## Limitations
166
-
* Existing AKS clusters cannot be converted to API Server VNet Integration clusters at this time.
167
-
* Only [private clusters](private-clusters.md) are supported at this time.
187
+
## Convert an existing AKS cluster to API Server VNet Integration
188
+
189
+
Existing AKS public clusters can be converted to API Server VNet Integration clusters by supplying an API server subnet that meets the requirements above (in the same VNet as the cluster nodes, permissions granted for the AKS cluster identity, and size of at least /28). This is a one-way migration; clusters cannot have API Server VNet Integration disabled after it has been enabled.
190
+
191
+
This upgrade will perform a node-image version upgrade on all node pools - all workloads will be restarted as all nodes will undergo a rolling image upgrade.
192
+
193
+
> [!WARNING]
194
+
> Converting a cluster to API Server VNet Integration will result in a change of the API Server IP address, though the hostname will remain the same. If the IP address of the API server has been configured in any firewalls or network security group rules, those rules may need to be updated.
## Enable or disable private cluster mode on an existing cluster with API Server VNet Integration
204
+
205
+
AKS clusters configured with API Server VNet Integration can have public network access/private cluster mode enabled or disabled without redeploying the cluster. The API server hostname will not change, but public DNS entries will be modified or removed as appropriate.
206
+
207
+
### Enable private cluster mode
208
+
209
+
```azurecli-interactive
210
+
az aks update -n <cluster-name> \
211
+
-g <resource-group> \
212
+
--enable-private-cluster
213
+
```
214
+
215
+
### Disable private cluster mode
216
+
217
+
```azurecli-interactive
218
+
az aks update -n <cluster-name> \
219
+
-g <resource-group> \
220
+
--disable-private-cluster
221
+
```
222
+
223
+
## Limitations
224
+
225
+
* Existing AKS private clusters cannot be converted to API Server VNet Integration clusters at this time.
168
226
*[Private Link Service][private-link-service] will not work if deployed against the API Server injected addresses at this time, so the API server cannot be exposed to other virtual networks via private link. To access the API server from outside the cluster network, utilize either [VNet peering][virtual-network-peering] or [AKS run command][command-invoke].
0 commit comments