Requirement:
3 microservices out of 10 microservices in a namespace/cluster, need to have external communication over 3 different networks. How can AKS support this?
Solution
Possible use of Loadbalancer: where 3 Loadbalancer can be used (in front of AKS cluster) with private IP assigned from the 3 vnets/subnet created?
Issue
Tried above approach where:
3 vnet created vnetA, vnetB, vnetC (with respective subnet (subnetA, subnetB, subnetC in each of these 3 vnets)
Create a Service, for loadbalancer, where we use annotation:
service.beta.kubernetes.io/azure-load-balancer-internal-subnet: "subnetA"service.beta.kubernetes.io/azure-load-balancer-internal: "false"loadBalancerIP: 107.121.148.240 (part of vnetA/subnetA)
Created the loadbalancer service - but there is no EXTERNAL_IP assigned; And error:
Error syncing load balancer: failed to ensure load balancer: ensure(mco/sonaslbaks): lb(kubernetes-internal) - failed to get subnet: aks-vnet-16762436/aks-subnet
i.e., It's not using the subnet mentioned in Annotation
Que
How can we achieve this. i.e., 3 different microservices can be reached by custom defined (private) IP, from 3 different networks (vnet) in the AKS cluster created using kubenet (i.e. default vnet created).




