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
title: Container Networking with Azure Application Gateway for Containers
3
+
description: Learn how Azure Application Gateway for Containers works with different container networking interfaces.
4
+
services: application gateway
5
+
author: greg-lindsay
6
+
ms.service: azure-appgw-for-containers
7
+
ms.topic: concept-article
8
+
ms.date: 3/24/2025
9
+
ms.author: greglin
10
+
---
11
+
12
+
# Container Networking with Application Gateway for Containers
13
+
14
+
## Overview
15
+
16
+
Kubernetes uses Container Networking Interface (CNI) plugins to manage networking in Kubernetes clusters. CNIs are responsible for assigning IP addresses to pods, network routing between pods, Kubernetes Service routing, and more.
17
+
18
+
Azure Kubernetes Service (AKS) uses two main networking models: **overlay** network and **flat** network.
19
+
20
+
***Overlay networks**:
21
+
* Conserve VNet IP address space by using logically separate CIDR ranges for pods.
22
+
* Maximum cluster scale support.
23
+
* Simple IP address management.
24
+
25
+
***Flat networks**:
26
+
* Pods get full VNet connectivity and can be directly reached via their private IP address from connected networks.
27
+
* Require large, nonfragmented VNet IP address space.
28
+
29
+
When choosing a networking model, consider the use cases for each CNI plugin and the type of network model it uses:
30
+
31
+
| CNI plugin | Networking model | Use case highlights |
|**Azure CNI Overlay**| Overlay | - Best for VNET IP conservation<br/>- Max node count supported by API Server + 250 pods per node<br/>- Simpler configuration<br/> -No direct external pod IP access |
34
+
|**Azure CNI Pod Subnet**| Flat | - Direct external pod access<br/>- Modes for efficient VNet IP usage _or_ large cluster scale support(Preview) |
35
+
|**Azure CNI Node Subnet**| Flat | - Direct external pod access<br/>- Simpler configuration <br/>- Limited scale <br/>- Inefficient use of VNet IPs |
36
+
37
+
When provisioning Application Gateway for Containers into a cluster that has CNI Overlay or CNI enabled, Application Gateway for Containers automatically detects the intended network configuration. There are no changes needed in Gateway or Ingress API configuration to specify CNI Overlay or CNI.
38
+
39
+
## CNI Overlay and Application Gateway for Containers
40
+
41
+

42
+
43
+
A separate routing domain is created in the Azure Networking stack for the pod's private CIDR space, which creates an Overlay network for direct communication between pods. When Application Gateway for Containers is provisioned, the Overlay routing domain is further extended to the Application Gateway for Containers subnet, allowing proxying of requests from Application Gateway for Containers directly to pods.
44
+
45
+
Application Gateway for Containers supports Azure Network Policies, Calico, and Cilium Kubernetes network policies running within the cluster.
46
+
47
+
> [!IMPORTANT]
48
+
> Application Gateway for Containers with CNI Overlay is in PREVIEW.<br>
49
+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
50
+
51
+
### Limitations
52
+
53
+
* ALB Controller: You must be running version 1.5.0 or greater to take advantage of CNI Overlay.
54
+
* Subnet Size: The Application Gateway for Containers subnet must be a /24 prefix; only one deployment is supported per subnet. A larger or smaller prefix isn't supported.
55
+
* Regional VNet Peering: Application Gateway for Containers deployed in a virtual network in region A and the AKS cluster nodes in a virtual network in region A is not supported.
56
+
* Global VNet Peering: Application Gateway for Containers deployed in a virtual network in region A and the AKS cluster nodes in a virtual network in region B is not supported.
57
+
58
+
## CNI and Application Gateway for Containers
59
+
60
+
Application Gateway for Containers supports various deployments of Azure CNI running within your Kubernetes cluster.
61
+
62
+
* Azure CNI for dynamic IP allocation
63
+
* Azure CNI for static block allocation
64
+
65
+
In both cases, Application Gateway for Containers supports Azure Network Policies, Calico, and Cilium Kubernetes network policies running within the cluster.
66
+
67
+
## Kubenet and Application Gateway for Containers
68
+
69
+
Kubenet isn't supported by Application Gateway for Containers. If using Kubenet, we recommend [upgrading to CNI Overlay](/azure/aks/upgrade-aks-ipam-and-dataplane#kubenet-cluster-upgrade).
70
+
71
+
## FAQ
72
+
73
+
Q: Can I upgrade an existing cluster with Application Gateway for Containers from CNI to CNI Overlay?
74
+
75
+
A: Yes, upgrade of the AKS cluster from CNI to CNI Overlay and Application Gateway for Containers automatically detects the change. It is recommended to schedule this during a maintenance window as it may take a few minutes post-cluster upgrade to detect and configure support for CNI Overlay.
76
+
77
+
>[!WARNING]
78
+
> Ensure the Application Gateway for Containers subnet is a /24 prior to upgrading. Upgrading from CNI to CNI Overlay with a larger subnet (i.e. /23) will lead to an outage and require the Application Gateway for Containers subnet to be recreated with a /24 subnet size.
79
+
80
+
Q: Can I upgrade an existing cluster with Kubenet to CNI Overlay?
81
+
82
+
A: Yes, however, installation of Application Gateway for Containers on a cluster with Kubenet isn't supported. Install Application Gateway for Containers post-upgrade to CNI Overlay.
Copy file name to clipboardExpand all lines: articles/application-gateway/for-containers/faq.yml
+18-8Lines changed: 18 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ metadata:
6
6
author: greg-lindsay
7
7
ms.service: azure-appgw-for-containers
8
8
ms.topic: concept-article
9
-
ms.date: 02/27/2024
9
+
ms.date: 3/24/2025
10
10
ms.author: greglin
11
11
12
12
title: Frequently asked questions about Application Gateway for Containers
@@ -19,19 +19,29 @@ sections:
19
19
answer: Application Gateway for Containers offers various layer 7 load-balancing capabilities for your container applications. This service is highly available, scalable, and fully managed by Azure.
20
20
21
21
- question: Where does Application Gateway for Containers store customer data?
22
-
answer: Application Gateway for Containers stores and processes data in the region of its deployed resource(s). Configuration data may be replicated to its region pair, where applicable, for resiliency.
22
+
answer: Application Gateway for Containers stores and processes data in the region of its deployed resources. Configuration data may be replicated to its region pair, where applicable, for resiliency.
23
23
24
24
- question: How does Application Gateway for Containers handle routine maintenance?
25
25
answer: Routine maintenance and updates are designed to not be service impacting and require no customer intervention. For updates that might break existing configurations or cause existing product functionality changes, notifications are published via [Azure Service Health](/azure/service-health/alerts-activity-log-service-notifications-portal). These notifications are also sent via email to subscription service administrators.
26
26
27
27
- question: Does Application Gateway for Containers support FIPS?
28
-
answer: Yes, Application Gateway for Containers can run in a FIPS 140-2 approved mode of operation, commonly referred to as "FIPS mode". FIPS mode calls a FIPS 140-2 validated cryptographic module that ensures FIPS-compliant algorithms for encryption, hashing, and signing are used. Please open a support case via the Azure portal to request FIPS mode to be enabled if required.
28
+
answer: Yes, Application Gateway for Containers can run in a FIPS 140-2 approved mode of operation, commonly referred to as **FIPS mode**. FIPS mode calls a FIPS 140-2 validated cryptographic module that ensures FIPS-compliant algorithms for encryption, hashing, and signing are used. If necessary, open a support case via the Azure portal to request that FIPS mode be enabled.
29
+
30
+
- question: Does Application Gateway for Containers support Kubenet?
31
+
answer: No, Application Gateway for Containers doesn't support Kubenet in favor of [CNI Overlay](/azure/aks/azure-cni-overlay). [Learn more](/azure/aks/upgrade-aks-ipam-and-dataplane) about migrating from Kubenet to CNI Overlay.
29
32
30
33
- name: Performance
31
34
questions:
32
35
- question: How does Application Gateway for Containers support high availability and scalability?
33
36
answer: Application Gateway for Containers automatically ensures underlying components are spread across availability zones for increased resiliency, if the Azure region supports it. If the region doesn't support zones, fault domains and update domains be used to help mitigate impact during planned maintainence and unexpected failures.
34
-
37
+
>[!WARNING]
38
+
> Ensure the Application Gateway for Containers subnet is a /24 prior to upgrading. Upgrading from CNI to CNI Overlay with a larger subnet (i.e. /23) will lead to an outage and require the Application Gateway for Containers subnet to be recreated with a /24 subnet size.
39
+
40
+
- name: Configuration - AKS
41
+
questions:
42
+
- question: Can I upgrade an existing AKS cluster with Application Gateway for Containers from CNI to CNI Overlay?
43
+
answer: Yes. Upgrade of the AKS cluster from CNI to CNI Overlay and Application Gateway for Containers automatically detects the change. It is recommended to schedule this during a maintenance window as it may take a few minutes post-cluster upgrade to detect and configure support for CNI Overlay.
44
+
35
45
- name: Configuration - TLS
36
46
questions:
37
47
- question: Does Application Gateway for Containers support reencryption (end-to-end encryption) of traffic to backend targets?
@@ -43,16 +53,16 @@ sections:
43
53
- name: Configuration - ALB Controller
44
54
questions:
45
55
- question: Is it supported to install both Application Gateway Ingress Controller (AGIC) and ALB Controller in the same Kubernetes cluster?
46
-
answer: Yes, both Application Gateway Ingress Controller (AGIC) and ALB Controller may run at the same time in the same Kubernetes cluster. Updates to AGIC or to ALB Controller won't interfere with each other.
56
+
answer: Yes, both Application Gateway Ingress Controller (AGIC) and ALB Controller may run at the same time in the same Kubernetes cluster. Updates to AGIC or to ALB Controller don't interfere with each other.
47
57
48
58
- question: Is it supported to install multiple ALB Controllers on the same Kubernetes cluster?
49
-
answer: It's possible to install multiple ALB Controllers on the same cluster, however this isn't recommended or supported as it's not possible to partition gateways, routes, services, etc.
59
+
answer: It's possible to install multiple ALB Controllers on the same cluster, however this option isn't recommended or supported as it's not possible to partition gateways, routes, services, etc.
50
60
51
61
- question: Is it supported to increase the number of pods/replicas for ALB Controller?
52
-
answer: No, user defined replica count is not supported. ALB Controller is automatically provisioned with at least two replicas in active/passive configuration to enable high availability.
62
+
answer: No, user defined replica count is not supported. ALB Controller is automatically provisioned with at least two replicas in active/passive configuration to enable high availability.
53
63
54
64
- question: Is it supported to use the same managed identity with multiple ALB Controllers?
55
65
answer: No. Each ALB controller must use its own unique managed identity.
56
66
57
67
- question: Can I share the same frontend resource between multiple Gateway and/or Ingress resources in Kubernetes?
58
-
answer: No. A frontend should be unique to a single Ingress or Gateway resource. Multiple hostnames and routes can be defined in a given Gateway or Ingress resource to eliminate the need for numerous frontend resources.
68
+
answer: No. A frontend should be unique to a single Ingress or Gateway resource. Multiple hostnames and routes can be defined in a given Gateway or Ingress resource to eliminate the need for numerous frontend resources.
0 commit comments