0

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
  • 13,012
  • 8
  • 37
  • 61

2 Answers2

0

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
  • 69,186
  • 6
  • 100
  • 141
  • I created a new vnet, connected the api management with it and peered this vnet with the one of the azure container serivce. This worked fine, but right now there is no load balancing – cre8 Jul 04 '17 at 08:06
  • that's nice to know, but how does that help, like i said, you can't have 2 load balancers attached to a nic. the way around this might be to use 2 nics on the kubernetes agents, but I've never tried that – 4c74356b41 Jul 04 '17 at 08:08
0

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
  • 13,710
  • 2
  • 16
  • 25
  • Just checking in to see if the information provided was helpful. Please let me know if you would like further assistance. – Jason Ye Jul 11 '17 at 14:20
  • How about create a VM and install Haproxy on it work as a load balancer? does this work for you? – Jason Ye Jul 18 '17 at 08:25