Skip to content

Commit ec6cc33

Browse files
authored
Merge pull request #105750 from tyler-lloyd/patch-3
update for Kubnet dual stack GA
2 parents 6bf9d10 + 8e7eca2 commit ec6cc33

File tree

1 file changed

+7
-46
lines changed

1 file changed

+7
-46
lines changed

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

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

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

1515
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).
1616

1717
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].
1818

1919
## Limitations
20-
> [!NOTE]
21-
> Dual-stack kubenet networking is currently not available in sovereign clouds. This note will be removed when rollout is complete.
2220
* 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.
23-
* During preview, service objects are only supported with `externalTrafficPolicy: Local`.
21+
* In Mariner node pools, service objects are only supported with `externalTrafficPolicy: Local`.
2422
* 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.
2523
* Features **not supported on dual-stack kubenet** include:
2624
* [Azure network policies](use-network-policies.md#create-an-aks-cluster-and-enable-network-policy)
@@ -33,45 +31,8 @@ This article shows you how to use dual-stack networking with an AKS cluster. For
3331

3432
* All prerequisites from [configure kubenet networking](configure-kubenet.md) apply.
3533
* 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.
36-
* Azure CLI with the `aks-preview` extension 0.5.48 or newer.
3734
* If using Azure Resource Manager templates, schema version 2021-10-01 is required.
3835

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

7738
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.
@@ -292,16 +253,16 @@ nginx-55649fd747-r2rqh 10.244.1.2,fd12:3456:789a:0:1::2 aks-nodepool1-145084
292253
293254
> [!IMPORTANT]
294255
> There are currently two limitations pertaining to IPv6 services in AKS. These are both preview limitations and work is underway to remove them.
295-
> * 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.
296257
> * 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.
297258
298259
IPv6 services in Kubernetes can be exposed publicly similarly to an IPv4 service.
299260
300261
# [`kubectl expose`](#tab/kubectl)
301262
302263
```bash-interactive
303-
kubectl expose deployment nginx --name=nginx-ipv4 --port=80 --type=LoadBalancer --overrides='{"spec":{"externalTrafficPolicy":"Local"}}'
304-
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"]}}'
305266
```
306267

307268
```
@@ -320,7 +281,7 @@ metadata:
320281
app: nginx
321282
name: nginx-ipv4
322283
spec:
323-
externalTrafficPolicy: Local
284+
externalTrafficPolicy: Cluster
324285
ports:
325286
- port: 80
326287
protocol: TCP
@@ -336,7 +297,7 @@ metadata:
336297
app: nginx
337298
name: nginx-ipv6
338299
spec:
339-
externalTrafficPolicy: Local
300+
externalTrafficPolicy: Cluster
340301
ipFamilies:
341302
- IPv6
342303
ports:

0 commit comments

Comments
 (0)