AKS icon indicating copy to clipboard operation
AKS copied to clipboard

App Gateway for Containers + Azure CNI Overlay support

Open chasewilson opened this issue 2 years ago • 23 comments

Azure CNI Overlay does not currently work with Application Gateway for Containers. This removes that limitation and allows App Gateway for Containers to be used with your Azure CNI Overlay Clusters.

chasewilson avatar Dec 03 '24 21:12 chasewilson

Will AGC available in all regions? It is still only available in limited regions: Image

This brings challenge to migrate from AGIC to AGC.

JoeyC-Dev avatar Dec 04 '24 07:12 JoeyC-Dev

@chasewilson Application Gateway for Containers currently only supports Azure CNI Pod Subnet; both Dynamic and Static allocation. CNI Overlay is on our short-term roadmap. Kubenet will not be supported on Application Gateway for Containers, in favor of Azure CNI Overlay when available.

@JoeyC-Dev the list of regions is correct and will continue to be incrementally added over time.

#please-close

JackStromberg avatar Dec 04 '24 14:12 JackStromberg

Eagerly waiting for this one, Azure CNI Overlay with Cilium is the superior network setup in AKS.

illrill avatar Dec 19 '24 15:12 illrill

Eagerly waiting for this feature, We use self managed karpenter for autoscaling of nodes but Karpenter has a hard requirement of Azure CNI overlay for networking so We are currently not able to use Azure gateway for Containers.

Harshithraj24 avatar Dec 21 '24 15:12 Harshithraj24

Why is this ticket closed if it is not released?

franklouwers avatar Dec 23 '24 10:12 franklouwers

Seconding the above comment. is this GA?

amithkk avatar Dec 30 '24 17:12 amithkk

is this GA?

No, this is not GA. We will announce via Azure service updates when available.

JackStromberg avatar Dec 30 '24 17:12 JackStromberg

Any ETA on this? we would like to user karpenter/NAP but it does work only with Overlay, hence we cannot use it if we use App GW for Containers

bongi23 avatar Feb 04 '25 18:02 bongi23

CNI Overlay for Application Gateway for Containers is planned and well along in development.

We are very aware of this ask and will provide an update once available. We are just as eager as the community to get this feature released. If you work through your Microsoft account team to have them reach out to me, I can provide more insight.

Thank you, Jack

JackStromberg avatar Feb 04 '25 18:02 JackStromberg

Application Gateway for Containers can now seamlessly integrate with AKS clusters using CNI Overlay!

More details can be found here: https://aka.ms/agc/overlay

Cheers!

JackStromberg avatar Apr 01 '25 18:04 JackStromberg

Hi, has anyone managed to get Application Gateway for Containers working with the CNI overlay? I have tried both ways BYO deployment and managed by ALB controller, but every time "no healthy upstream".

krylop avatar Apr 16 '25 12:04 krylop

BYO VNet with Application Gateway For Containers + CNI Overlay is a valid configuration. The only gotcha where connectivity does not currently work is if Application Gateway for Containers is in VNET A and the AKS cluster is in VNET B.

What version of ALB Controller are you running as well (please make sure it is 1.5.2)? Are you in a peered vnet scenario? Was this a cluster previously running Kubenet/CNI and upgraded to CNI Overlay? If the cluster was updated, was the configuration working and then you had upgraded to overlay and things stopped?

JackStromberg avatar Apr 16 '25 13:04 JackStromberg

AKS nodes and ALB delegated subnet are in the same VNET, location: West Europe It's new cluster, Network configuration: Azure CNI Overlay, Network policy: Azure I'm using alb-controller 1.5.2, pods are running, no errors in logs. Gateway deployment creates new frontend in AGC, but there is no healthy backends in metrics.

krylop avatar Apr 17 '25 09:04 krylop

CNI Overlay + Application Gateway for Containers + West Europe is a valid configuration.

What do you show as the status on each of the provisioned resources (ApplicationLoadBalancer (if managed scenario), Gateway, HTTPRoute, and any other service specific resources). In parallel, I'd recommend opening a case so we can gather these details to further troubleshoot.

JackStromberg avatar Apr 17 '25 14:04 JackStromberg

@krylop no I am not able to get it to work, also getting "no healthy upstream"... I am running into the exact same issues, no errors in log, but also not healthy backends. I am doing a BYO alb deployment though...

Some extra details:

  • peered VNET
  • fresh cluster deployment with CNI overlay
  • version 1.5.2

Droppers avatar Apr 18 '25 21:04 Droppers

Unfortunately, peered vnet is not supported at this time. Out of curiosity, @Droppers are you doing regional or global vnet peering? https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/container-networking#limitations

JackStromberg avatar Apr 18 '25 21:04 JackStromberg

My application gateway for containers is deployed to a subnet in the same VNET as my AKS cluster, that should be fine right? I have VNET peering enabled only to access my private cluster from another VNET, not for the application gateway / AKS combination.

Region: West Europe

How I have configured it: ALB

  • 1 frontend
  • association to /24 subnet as specified

my-managed-identity

  • Role assignment: AppGwforContainersConfigurationManager to ALB resource group
  • Role assignment: NetworkContributor to association subnet

alb-controller

helm install alb-controller oci://mcr.microsoft.com/application-lb/charts/alb-controller --version 1.5.2 --set albController.podIdentity.clientID={my-managed-identity}

gateway

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway-app
  namespace: ns-gateway
  annotations:
    alb.networking.azure.io/alb-id: {my-application-gateway-for-containers-resource-id}
spec:
  gatewayClassName: azure-alb-external
  listeners:
  - name: http-listener
    port: 80
    protocol: HTTP
    allowedRoutes:
      namespaces:
        from: All # Same
  addresses:
  - type: alb.networking.azure.io/alb-frontend
    value: {my-frontend-name}

httproute

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: httproute-app
  namespace: ns-app
spec:
  parentRefs:
  - kind: Gateway
    name: gateway-app
    namespace: ns-gateway
  rules:
  - backendRefs:
    - name: svc-app
      port: 80

Droppers avatar Apr 18 '25 21:04 Droppers

Looks good. Can you email me at my firstname.lastname at the company I work for? We can dig a little deeper into why it's not working for your deployment. Also in the controller pod logs, do you see a line item stating that it detected your cluster's network configuration as overlay?

JackStromberg avatar Apr 18 '25 21:04 JackStromberg

Hi @Droppers, looks like we have the same case. I'm only able to get it work with Azure CNI Pod Subnet, but it's not ideal. There needs to be dedicated subnet for pods.

@JackStromberg Controller logs doesn't show that information in my case. That information only shows when I'm using Azure CNI Pod Subnet.

krylop avatar Apr 19 '25 04:04 krylop

After enabling AGIC on CNI overlay clusters, the azure UI portal still shows the feature as disabled, but I can verify it from CLI that it is enabled and works fine.

When the portal UI bug would be fixed?

Path: AKS cluster --> Networking --> Virtual network integration --> Application Gateway Ingres Controller

Satheeshkumar433 avatar Apr 24 '25 09:04 Satheeshkumar433