Azure container services and Application gateway

11/9/2017

I connected an Application Gateway as a frontend for the services in the kubernetes cluster. I created a subnet on the k8s-vnet-<id> with address space 10.0.0.0/29 and connected the Application Gateway to that subnet.

I followed instrucions from https://fizzylogic.nl/2017/06/16/how-to-connect-azure-api-management-to-your-kubernetes-cluster/

When I try to scale the ContainerServices I get the following error:

Operation name: Write VirtualNetworks
Error code: InUseSubnetCannotBeDeleted
Message: 
Subnet api-gateway-subnet is in use by /subscriptions/cdf495e8-6232-4a61-a661-716fec93f8b5/resourceGroups/KuberGoPlay/providers/Microsoft.Network/applicationGateways/ngaz-appgw-play/gatewayIPConfigurations/appGatewayIpConfig and cannot be deleted.

Why is the container service trying to delete the subnet when it scales? Or am I connecting the Application Gateway the wrong way ?

/Martin

-- user3107823
azure
kubernetes
networking

1 Answer

11/10/2017

Why is the container service trying to delete the subnet when it scales?

When we try to scale up or scale down (update a resource) Azure container service, the request is processed by deleting and creating the resource.

You may encounter this error when attempting to update a resource, but the request is processed by deleting and creating the resource. Make sure to specify all unchanged values.

More information about InUseSubnetCannotBeDeleted, please refer to that link.

Here a article talk about how to use template to update resource, please refer to it.

-- Jason Ye
Source: StackOverflow