Getting started with "Kubegres" operator
by Alex Arica

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql pods with data replication and failover enabled out-of-the box. It brings simplicity when using PostgreSql considering how complex managing stateful-set's life-cycle and data replication could be with Kubernetes.

Kubegres has the following features:

  • It can manage one or many clusters of Postgres instances. Each cluster of Postgres instances is created using a YAML of "kind: Kubegres". Each cluster is self-contained and is identified by its unique name and namespace.
  • It creates a cluster of PostgreSql servers with data replication enabled: it creates a Primary PostgreSql pod and a number of Replica PostgreSql pods and replicates primary's database in real-time to Replica pods.
  • It manages fail-over: if a Primary PostgreSql crashes, it automatically promotes a Replica PostgreSql as a Primary.
  • It has a data backup option allowing to dump PostgreSql data regularly in a given volume.
  • It provides a very simple YAML with properties specialised for PostgreSql.
  • It is resilient, has over 55 automatized tests cases and has been running in production.
  • It works with the PostgreSql containers created by the Docker Official Images team. Kubegres uses the standard PostgreSql libraries to manage replication and failover and it does not require a custom Docker image with a set of third party libraries.
  • It is portable because compatible with any Docker images which derive from the PostgreSql containers.

Kubegres was developed by Reactive Tech Limited and Alex Arica as the lead developer.

It is Open-Source and available on GitHub:

To install Kubegres, the official Kubegres documentation is the perfect place to start. Please see the page getting-started.