Get the latest tech news
Spilo: High Availability PostgreSQL cluster using Docker
Highly available elephant herd: HA PostgreSQL cluster using Docker - zalando/spilo
There is already a Helm chart that relies on Spilo and Patroni to provision a five-node PostgreSQL HA cluster in a Kubernetes+Google Compute Engine environment. There are two ways to achieve this: A) if the load balancer relies on the status code to distinguish between the healthy and failed nodes (like ELB), then one needs to configure it to poll the API URL; otherwise, B) you can use callback scripts to change the load balancer configuration dynamically. Spilo master initializes PostgreSQL and creates the superuser and replication user ( postgres and standby by default).
Or read this on Hacker News