Create loadbalancer inside a vnet with azure

7/4/2017

I want to create a load balancer for all my agents. In the official docs I found a guide for an external load balancer, but I want to connect it with the api management so it has to be only visible in the vnet.

This post works if you only have one agent (you enter the private ip of the agent in your api route). But it does not handle the second agent. Is it possible to use Azure API Management and Azure ACS (kubernetes) as frontend and backend?

So in my case I need to create a load balancer that handles all agents for the service and has a private ip in a vnet in that the api management service also is.

-- cre8
azure
kubernetes
load-balancing
vnet

2 Answers

7/4/2017

As 4c74356b41 said, we can't add a VM to two backend pools (if your k8s create via azure portal, the agents in a VMSS.)

In your scenario, I think we can create a VM in ACS resource group, and install load balance software on it, make this VM work as a load balancer.

For example, we can use Haproxy to load balance the network traffic to agents.

-- Jason Ye
Source: StackOverflow

7/4/2017

well, nothing prevents you from connecting api management to an external endpoint, so there's that.

and if you really want internal endpoint I doubt that it is possible, since a NIC can only be attached to a single load balancer. maybe if you detach agent nics from the external load balancer and attach them to internal load balancer... that might work, but looks like a solid hack.

other way around this might be using ACS engine to generate a template for you and alter the template to deploy internal load balancer.

-- 4c74356b41
Source: StackOverflow