How can I achieve an active/passive setup across multiple kubernetes clusters?

3/29/2019

We have 2 kubernetes clusters hosted on different data centers and we're deploying the applications to both these clusters. We have an external load balancer which is outside the clusters but the the load balancer only accepts static IPs. We don't have control over the clusters and we can't provision a static IP. How can we go about this?

We've also tried kong as an api gateway. We were able to create an upstream with targets as load balanced application endpoints and providing different weights but this doesn't give us active/passive or active/failover. Is there a way we can configure kong/nginx upstream to achieve this?

-- Zuke
api-gateway
high-availability
kong
kubernetes

1 Answer

5/21/2019

Consider using HA proxy, where you can configure your passive cluster as backup upstream, and you will get active/passive cluster working. As mentioned in this nice guide about HA proxy

backup meaning it won’t participate in the load balance unless both the nodes above have failed their health check (more on that later). This configuration is referred to as active-passive since the backup node is just sitting there passively doing nothing. This enables you to economize by having the same backup system for different application servers.

Hope it helps!

-- coolinuxoid
Source: StackOverflow