The source texts of the Kubegres project have been published, designed to create a cluster of replicated servers with the PostgreSQL DBMS, deployed in a container isolation infrastructure based on the Kubernetes platform. The package also manages data replication between servers, establishes fault-tolerant configurations, and organizes backups. The project's code is written in Go and is distributed under the Apache 2.0 license.
The created cluster consists of one primary PostgreSQL pod and real-time replicated secondary pods synchronized with the primary node. In the event of a failure on the primary node, the system automatically promotes one of the secondary nodes to primary without downtime and adjusts the replication configuration seamlessly. There is an option to configure regular database backups to a separate storage. The cluster configuration is specified in YAML format. The node's content is created based on the official PostgreSQL container image provided by the Docker project. The system's operation is stable and is already applied in industrial implementations.
Source: opennet.ru
