0

I'm trying to connect my Web App to the AKS LoadBalancer through the VNet integration instead of a public load balancer.

The problem here is to integrate VNet into the web app, the VNet needs to have a subnet delegated to Microsoft.Web/serverFarms. On the other hand, AKS cannot be assigned with a subnet that has a delegation. I have found this that seemingly has done the exact same thing but it seems to be old as I cannot reproduce the same result. Either I get VNET aks-subnet is missing a delegation to Microsoft.Web/serverFarms. Please add the delegation and try again. or aks-subnet cannot be used as it's a delegated subnet

I have tried to add two subnets one with delegation to managedClusters and use that for my AKS but the same ... cannot be used as it's a delegated subnet happens.

sidenote: I'm using the bicep script to deploy.

kasravi
  • 23
  • 3
  • Hi kasravi. You need to create a dedicated subnet for the VNET integration. The subnet must not be used by another service. If you have IP address space left in your VNET you can just create a new subnet with /27 as a minimum (in prod use /26) and delegate it to `Microsoft.Web/serverFarms`. – holger Sep 15 '22 at 11:56
  • so I need to have two subnets, /16 without delegation and /27 with? – kasravi Sep 15 '22 at 11:58
  • 1
    If the /16 is for your AKS and /27 for your App Service VNET integration, then yes, that should work. – holger Sep 15 '22 at 12:32

1 Answers1

0

VNET Integration requires a dedicated subnet for the App Service that is going to be integrated. This means the subnet cannot be used for any other purpose, i.E. hosting AKS or VMs.

VNET Integration

The App Service can then reach services in other subnets on the same VNET or in peered VNETs.

Subnet Size Requirements are a minimum of /27 and Microsoft recommends /26 for production grade environments.

It is sometimes a little tricky to troubleshoot issues with VNET integration, some good hints are documented here.

holger
  • 788
  • 6
  • 8