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/egress-outboundtype.md
+63-67Lines changed: 63 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,133 +5,129 @@ author: asudbring
5
5
ms.subservice: aks-networking
6
6
ms.author: allensu
7
7
ms.topic: how-to
8
-
ms.date: 06/29/2020
8
+
ms.date: 03/28/2023
9
9
10
10
#Customer intent: As a cluster operator, I want to define my own egress paths with user-defined routes. Since I define this up front I do not want AKS provided load balancer configurations.
11
11
---
12
12
13
13
# Customize cluster egress with outbound types in Azure Kubernetes Service (AKS)
14
14
15
-
Egress from an AKS cluster can be customized to fit specific scenarios. By default, AKS will provision a Standard SKU Load Balancer to be set up and used for egress. However, the default setup may not meet the requirements of all scenarios if public IPs are disallowed or additional hops are required for egress.
15
+
You can customize egress for an AKS cluster to fit specific scenarios. By default, AKS will provision a standard SKU load balancer to be set up and used for egress. However, the default setup may not meet the requirements of all scenarios if public IPs are disallowed or additional hops are required for egress.
16
16
17
-
This article covers the various types of outbound connectivity that are available in AKS Clusters.
17
+
This article covers the various types of outbound connectivity that are available in AKS clusters.
18
+
19
+
> [!NOTE]
20
+
> You can now update the `outboundType` after cluster creation. This feature is in preview. See [Updating `outboundType after cluster creation (preview)](#updating-outboundtype-after-cluster-creation-preview).
18
21
19
22
## Limitations
20
-
* Outbound type can only be defined at cluster create time and can't be updated afterwards.
21
-
* Reconfiguring outbound type is now supported in preview; see below.
22
-
* Setting `outboundType` requires AKS clusters with a `vm-set-type` of `VirtualMachineScaleSets` and `load-balancer-sku` of `Standard`.
23
23
24
-
## Overview of outbound types in AKS
24
+
* Setting `outboundType` requires AKS clusters with a `vm-set-type`of `VirtualMachineScaleSets` and `load-balancer-sku` of `Standard`.
25
25
26
-
An AKS cluster can be configured with three different categories of outbound type: load balancer, NAT gateway, or user-defined routing.
26
+
## Outbound types in AKS
27
27
28
-
> [!IMPORTANT]
29
-
> Outbound type impacts only the egress traffic of your cluster. For more information, see [setting up ingress controllers](ingress-basic.md).
28
+
You can configure an AKS cluster using the following outbound types: load balancer, NAT gateway, or user-defined routing. The outbound type impacts only the egress traffic of your cluster. For more information, see [setting up ingress controllers](ingress-basic.md).
30
29
31
30
> [!NOTE]
32
-
> You can use your own [route table][byo-route-table] with UDR and kubenet networking. Make sure your cluster identity (service principal or managed identity) has Contributor permissions to the custom route table.
31
+
> You can use your own [route table][byo-route-table] with UDR and [kubenet networking](../aks/configure-kubenet.md). Make sure your cluster identity (service principal or managed identity) has Contributor permissions to the custom route table.
33
32
34
-
### Outbound type of loadBalancer
33
+
### Outbound type of `loadBalancer`
35
34
36
-
If `loadBalancer` is set, AKS completes the following configuration automatically. The load balancer is used for egress through an AKSassigned public IP. An outbound type of `loadBalancer` supports Kubernetes services of type `loadBalancer`, which expect egress out of the load balancer created by the AKS resource provider.
35
+
The load balancer is used for egress through an AKS-assigned public IP. An outbound type of `loadBalancer` supports Kubernetes services of type `loadBalancer`, which expect egress out of the load balancer created by the AKS resource provider.
37
36
38
-
The following configuration is done by AKS.
39
-
* A public IP address is provisioned for cluster egress.
40
-
* The public IP address is assigned to the load balancer resource.
41
-
* Backend pools for the load balancer are set up for agent nodes in the cluster.
37
+
If `loadBalancer` is set, AKS automatically completes the following configuration:
42
38
43
-
Below is a network topology deployed in AKS clusters by default, which use an `outboundType` of `loadBalancer`.
39
+
* A public IP address is provisioned for cluster egress.
40
+
* The public IP address is assigned to the load balancer resource.
41
+
* Backend pools for the load balancer are set up for agent nodes in the cluster.
44
42
45
43

46
44
47
-
For more information, see [using a standard load balancer in AKS](load-balancer-standard.md) for more information.
45
+
For more information, see [using a standard load balancer in AKS](load-balancer-standard.md).
48
46
49
47
### Outbound type of `managedNatGateway` or `userAssignedNatGateway`
50
48
51
-
If `managedNatGateway` or `userAssignedNatGateway` are selected for `outboundType`, AKS relies on [Azure Networking NAT gateway](../virtual-network/nat-gateway/manage-nat-gateway.md) for cluster egress.
52
-
53
-
-`managedNatGateway` is used when using managed virtual networks, and tells AKS to provision a NAT gateway and attach it to the cluster subnet.
54
-
-`userAssignedNatGateway` is used when using bring-your-own virtual networking, and requires that a NAT gateway has been provisioned before cluster creation.
49
+
If `managedNatGateway` or `userAssignedNatGateway` are selected for `outboundType`, AKS relies on [Azure Networking NAT gateway](../virtual-network/nat-gateway/manage-nat-gateway.md) for cluster egress.
55
50
56
-
NAT gateway has significantly improved handling of SNAT ports when compared to Standard Load Balancer.
51
+
* Select `managedNatGateway` when using managed virtual networks. AKS will provision a NAT gateway and attach it to the cluster subnet.
52
+
* Select `userAssignedNatGateway` when using bring-your-own virtual networking. This option requires that you have provisioned a NAT gateway before cluster creation.
57
53
58
-
For more information, see [using NAT Gateway with AKS](nat-gateway.md) for more information.
54
+
For more information, see [using NAT gateway with AKS](nat-gateway.md).
59
55
60
-
### Outbound type of userDefinedRouting
56
+
### Outbound type of `userDefinedRouting`
61
57
62
58
> [!NOTE]
63
-
> Using outbound type is an advanced networking scenario and requires proper network configuration.
59
+
> The `userDefinedRouting` outbound type is an advanced networking scenario and requires proper network configuration.
64
60
65
61
If `userDefinedRouting` is set, AKS won't automatically configure egress paths. The egress setup must be done by you.
66
62
67
-
The AKS cluster must be deployed into an existing virtual network with a subnet that has been previously configured because when not using standard load balancer (SLB) architecture, you must establish explicit egress. As such, this architecture requires explicitly sending egress traffic to an appliance like a firewall, gateway, proxy or to allow the Network Address Translation (NAT) to be done by a public IP assigned to the standard load balancer or appliance.
63
+
You must deploy the AKS cluster into an existing virtual network with a subnet that has been previously configured. Since you're not using a standard load balancer (SLB) architecture, you must establish explicit egress. This architecture requires explicitly sending egress traffic to an appliance like a firewall, gateway, proxy or to allow NAT to be done by a public IP assigned to the standard load balancer or appliance.
68
64
69
-
For more information, see [configuring cluster egress via user-defined routing](egress-udr.md) for more information.
65
+
For more information, see [configuring cluster egress via user-defined routing](egress-udr.md).
70
66
71
-
## Updating `outboundType` after cluster creation (PREVIEW)
67
+
## Updating `outboundType` after cluster creation (preview)
72
68
73
69
Changing the outbound type after cluster creation will deploy or remove resources as required to put the cluster into the new egress configuration.
74
70
75
71
Migration is only supported between `loadBalancer`, `managedNATGateway` (if using a managed virtual network), and `userDefinedNATGateway` (if using a custom virtual network).
76
72
77
73
> [!WARNING]
78
-
> Changing the outbound type on a cluster is disruptive to network connectivity and will result in a change of the cluster's egress IP address. If any firewall rules have been configured to restrict traffic from the cluster, they will need to be updated to match the new egress IP address.
74
+
> Changing the outbound type on a cluster is disruptive to network connectivity and will result in a change of the cluster's egress IP address. If any firewall rules have been configured to restrict traffic from the cluster, you need to update them to match the new egress IP address.
79
75
80
76
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
81
77
82
-
### Install the aks-preview Azure CLI extension
78
+
### Install the `aks-preview` Azure CLI extension
83
79
84
80
`aks-preview` version 0.5.113 is required.
85
81
86
-
To install the `aks-preview` extension, run the following command:
87
-
88
-
```azurecli
89
-
az extension add --name aks-preview
90
-
```
82
+
* Install and update the `aks-preview` extension.
91
83
92
-
Run the following command to update to the latest version of the extension released:
84
+
```azurecli
85
+
# Install aks-preview extension
86
+
az extension add --name aks-preview
93
87
94
-
```azurecli
95
-
az extension update --name aks-preview
96
-
```
88
+
# Update aks-preview extension
89
+
az extension update --name aks-preview
90
+
```
97
91
98
-
### Register the 'AKS-OutBoundTypeMigrationPreview' feature flag
92
+
### Register the `AKS-OutBoundTypeMigrationPreview` feature flag
99
93
100
-
Register the `AKS-OutBoundTypeMigrationPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
94
+
1. Register the `AKS-OutBoundTypeMigrationPreview` feature flag using the [`az feature register`][az-feature-register] command. It takes a few minutes for the status to show *Registered*.
101
95
102
-
```azurecli-interactive
103
-
az feature register --namespace "Microsoft.ContainerService" --name "AKS-OutBoundTypeMigrationPreview"
104
-
```
96
+
```azurecli-interactive
97
+
az feature register --namespace "Microsoft.ContainerService" --name "AKS-OutBoundTypeMigrationPreview"
98
+
```
105
99
106
-
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:
100
+
2. Verify the registration status using the [`az feature show`][az-feature-show] command.
107
101
108
-
```azurecli-interactive
109
-
az feature show --namespace "Microsoft.ContainerService" --name "AKS-OutBoundTypeMigrationPreview"
110
-
```
102
+
```azurecli-interactive
103
+
az feature show --namespace "Microsoft.ContainerService" --name "AKS-OutBoundTypeMigrationPreview"
104
+
```
111
105
112
-
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
106
+
3. When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider using the [`az provider register`][az-provider-register] command.
113
107
114
-
```azurecli-interactive
115
-
az provider register --namespace Microsoft.ContainerService
116
-
```
108
+
```azurecli-interactive
109
+
az provider register --namespace Microsoft.ContainerService
110
+
```
117
111
118
-
### Update a cluster to use a new outbound type
112
+
### Update cluster to use a new outbound type
119
113
120
-
Run the following command to change a cluster's outbound configuration:
114
+
* Update the outbound configuration of your cluster using the [`az aks update`][az-aks-update] command.
121
115
122
-
```azurecli-interactive
123
-
az aks update -g <resourceGroup> -n <clusterName> --outbound-type <loadBalancer|managedNATGateway|userAssignedNATGateway>
124
-
```
116
+
```azurecli-interactive
117
+
az aks update -g <resourceGroup> -n <clusterName> --outbound-type <loadBalancer|managedNATGateway|userAssignedNATGateway>
118
+
```
125
119
126
120
## Next steps
127
121
128
-
-[Configure standard load balancing in an AKS cluster](load-balancer-standard.md)
129
-
-[Configure NAT gateway in an AKS cluster](nat-gateway.md)
130
-
-[Configure user-defined routing in an AKS cluster](egress-udr.md)
0 commit comments