Skip to content

Commit 06e1f82

Browse files
authored
Merge pull request #210350 from phealy/pahealy/api-server-vnet-integration-public
AKS API Server VNet Integration Public Cluster
2 parents 3844bec + 0a2f7b0 commit 06e1f82

File tree

1 file changed

+72
-14
lines changed

1 file changed

+72
-14
lines changed

articles/aks/api-server-vnet-integration.md

Lines changed: 72 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: API Server VNet Integration in Azure Kubernetes Service (AKS)
33
description: Learn how to create an Azure Kubernetes Service (AKS) cluster with API Server VNet Integration
44
services: container-service
55
ms.topic: article
6-
ms.date: 06/27/2022
6+
ms.date: 09/09/2022
77
ms.custom: references_regions
88

99
---
@@ -12,29 +12,26 @@ ms.custom: references_regions
1212

1313
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.
1414

15-
16-
1715
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
1816

1917
## API server connectivity
2018

2119
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.
2220

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).
2422

2523
## Region availability
2624

2725
API Server VNet Integration is available in the following regions at this time:
2826

29-
- canary regions
3027
- eastus2
3128
- northcentralus
3229
- westcentralus
3330
- westus2
3431

3532
## Prerequisites
3633

37-
* Azure CLI with aks-preview extension 0.5.67 or later.
34+
* Azure CLI with aks-preview extension 0.5.97 or later.
3835
* If using ARM or the REST API, the AKS API version must be 2022-04-02-preview or later.
3936

4037
### Install the aks-preview CLI extension
@@ -69,9 +66,9 @@ When the feature has been registered, refresh the registration of the *Microsoft
6966
az provider register --namespace Microsoft.ContainerService
7067
```
7168

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
7370

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

7673
### Create a resource group
7774

@@ -81,7 +78,19 @@ Create a resource group or use an existing resource group for your AKS cluster.
8178
az group create -l westus2 -n <resource-group>
8279
```
8380

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
8594

8695
```azurecli-interactive
8796
az aks create -n <cluster-name> \
@@ -92,7 +101,7 @@ az aks create -n <cluster-name> \
92101
--enable-apiserver-vnet-integration
93102
```
94103

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

97106
## Create an AKS Private cluster with API Server VNet Integration using bring-your-own VNet
98107

@@ -148,7 +157,20 @@ az role assignment create --scope <cluster-subnet-resource-id> \
148157
--assignee <managed-identity-client-id>
149158
```
150159

151-
### Create the AKS cluster
160+
### Deploy a public cluster
161+
162+
```azurecli-interactive
163+
az aks create -n <cluster-name> \
164+
-g <resource-group> \
165+
-l <location> \
166+
--network-plugin azure \
167+
--enable-apiserver-vnet-integration \
168+
--vnet-subnet-id <cluster-subnet-resource-id> \
169+
--apiserver-subnet-id <apiserver-subnet-resource-id> \
170+
--assign-identity <managed-identity-resource-id>
171+
```
172+
173+
### Deploy a private cluster
152174

153175
```azurecli-interactive
154176
az aks create -n <cluster-name> \
@@ -162,9 +184,45 @@ az aks create -n <cluster-name> \
162184
--assign-identity <managed-identity-resource-id>
163185
```
164186

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.
195+
196+
```azurecli-interactive
197+
az aks update -n <cluster-name> \
198+
-g <resource-group> \
199+
--enable-apiserver-vnet-integration \
200+
--apiserver-subnet-id <apiserver-subnet-resource-id>
201+
```
202+
203+
## 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.
168226
* [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].
169227

170228
<!-- LINKS - internal -->

0 commit comments

Comments
 (0)