Skip to content

Commit a4d9799

Browse files
authored
update for Kubnet dual stack GA
Updates the kubenet dual-stack docs to support launch of GA.
1 parent 22ee152 commit a4d9799

File tree

1 file changed

+7
-45
lines changed

1 file changed

+7
-45
lines changed

articles/aks/configure-kubenet-dual-stack.md

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ ms.topic: how-to
99
ms.date: 12/15/2021
1010
---
1111

12-
# Use dual-stack kubenet networking in Azure Kubernetes Service (AKS) (Preview)
12+
# Use dual-stack kubenet networking in Azure Kubernetes Service (AKS)
1313

1414
AKS clusters can now be deployed in a dual-stack (using both IPv4 and IPv6 addresses) mode when using [kubenet][kubenet] networking and a dual-stack Azure virtual network. In this configuration, nodes receive both an IPv4 and IPv6 address from the Azure virtual network subnet. Pods receive both an IPv4 and IPv6 address from a logically different address space to the Azure virtual network subnet of the nodes. Network address translation (NAT) is then configured so that the pods can reach resources on the Azure virtual network. The source IP address of the traffic is NAT'd to the node's primary IP address of the same family (IPv4 to IPv4 and IPv6 to IPv6).
1515

1616
This article shows you how to use dual-stack networking with an AKS cluster. For more information on network options and considerations, see [Network concepts for Kubernetes and AKS][aks-network-concepts].
1717

1818
## Limitations
1919
> [!NOTE]
20-
> Dual-stack kubenet networking is currently not available in sovereign clouds. This note will be removed when rollout is complete.
2120
* Azure Route Tables have a hard limit of 400 routes per table. Because each node in a dual-stack cluster requires two routes, one for each IP address family, dual-stack clusters are limited to 200 nodes.
22-
* During preview, service objects are only supported with `externalTrafficPolicy: Local`.
21+
* Service objects are only supported with `externalTrafficPolicy: Local` in Mariner node pools.
2322
* Dual-stack networking is required for the Azure Virtual Network and the pod CIDR - single stack IPv6-only isn't supported for node or pod IP addresses. Services can be provisioned on IPv4 or IPv6.
2423
* Features **not supported on dual-stack kubenet** include:
2524
* [Azure network policies](use-network-policies.md#create-an-aks-cluster-and-enable-network-policy)
@@ -32,45 +31,8 @@ This article shows you how to use dual-stack networking with an AKS cluster. For
3231

3332
* All prerequisites from [configure kubenet networking](configure-kubenet.md) apply.
3433
* AKS dual-stack clusters require Kubernetes version v1.21.2 or greater. v1.22.2 or greater is recommended to take advantage of the [out-of-tree cloud controller manager][aks-out-of-tree], which is the default on v1.22 and up.
35-
* Azure CLI with the `aks-preview` extension 0.5.48 or newer.
3634
* If using Azure Resource Manager templates, schema version 2021-10-01 is required.
3735

38-
## Install the aks-preview Azure CLI extension
39-
40-
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
41-
42-
To install the aks-preview extension, run the following command:
43-
44-
```azurecli
45-
az extension add --name aks-preview
46-
```
47-
48-
Run the following command to update to the latest version of the extension released:
49-
50-
```azurecli
51-
az extension update --name aks-preview
52-
```
53-
54-
## Register the 'AKS-EnableDualStack' feature flag
55-
56-
Register the `AKS-EnableDualStack` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
57-
58-
```azurecli-interactive
59-
az feature register --namespace "Microsoft.ContainerService" --name "AKS-EnableDualStack"
60-
```
61-
62-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
63-
64-
```azurecli-interactive
65-
az feature show --namespace "Microsoft.ContainerService" --name "AKS-EnableDualStack"
66-
```
67-
68-
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
69-
70-
```azurecli-interactive
71-
az provider register --namespace Microsoft.ContainerService
72-
```
73-
7436
## Overview of dual-stack networking in Kubernetes
7537

7638
Kubernetes v1.23 brings stable upstream support for [IPv4/IPv6 dual-stack][kubernetes-dual-stack] clusters, including pod and service networking. Nodes and pods are always assigned both an IPv4 and an IPv6 address, while services can be single-stack on either address family or dual-stack.
@@ -291,16 +253,16 @@ nginx-55649fd747-r2rqh 10.244.1.2,fd12:3456:789a:0:1::2 aks-nodepool1-145084
291253
292254
> [!IMPORTANT]
293255
> There are currently two limitations pertaining to IPv6 services in AKS. These are both preview limitations and work is underway to remove them.
294-
> * Azure Load Balancer sends health probes to IPv6 destinations from a link-local address. This traffic cannot be routed to a pod and thus traffic flowing to IPv6 services deployed with `externalTrafficPolicy: Cluster` will fail. During preview, IPv6 services MUST be deployed with `externalTrafficPolicy: Local`, which causes `kube-proxy` to respond to the probe on the node, in order to function.
256+
> * Azure Load Balancer sends health probes to IPv6 destinations from a link-local address. In Mariner node pools, this traffic cannot be routed to a pod and thus traffic flowing to IPv6 services deployed with `externalTrafficPolicy: Cluster` will fail. IPv6 services MUST be deployed with `externalTrafficPolicy: Local`, which causes `kube-proxy` to respond to the probe on the node, in order to function.
295257
> * Only the first IP address for a service will be provisioned to the load balancer, so a dual-stack service will only receive a public IP for its first listed IP family. In order to provide a dual-stack service for a single deployment, please create two services targeting the same selector, one for IPv4 and one for IPv6.
296258
297259
IPv6 services in Kubernetes can be exposed publicly similarly to an IPv4 service.
298260
299261
# [`kubectl expose`](#tab/kubectl)
300262
301263
```bash-interactive
302-
kubectl expose deployment nginx --name=nginx-ipv4 --port=80 --type=LoadBalancer --overrides='{"spec":{"externalTrafficPolicy":"Local"}}'
303-
kubectl expose deployment nginx --name=nginx-ipv6 --port=80 --type=LoadBalancer --overrides='{"spec":{"externalTrafficPolicy":"Local", "ipFamilies": ["IPv6"]}}'
264+
kubectl expose deployment nginx --name=nginx-ipv4 --port=80 --type=LoadBalancer'
265+
kubectl expose deployment nginx --name=nginx-ipv6 --port=80 --type=LoadBalancer --overrides='{"spec":{"ipFamilies": ["IPv6"]}}'
304266
```
305267

306268
```
@@ -319,7 +281,7 @@ metadata:
319281
app: nginx
320282
name: nginx-ipv4
321283
spec:
322-
externalTrafficPolicy: Local
284+
externalTrafficPolicy: Cluster
323285
ports:
324286
- port: 80
325287
protocol: TCP
@@ -335,7 +297,7 @@ metadata:
335297
app: nginx
336298
name: nginx-ipv6
337299
spec:
338-
externalTrafficPolicy: Local
300+
externalTrafficPolicy: Cluster
339301
ipFamilies:
340302
- IPv6
341303
ports:

0 commit comments

Comments
 (0)