PostgreSQL HA Configuration
Production vs Demo Deployments
⚠️ Important: This document describes PostgreSQL HA setup for demo/development environments only.
For production deployments, use the CloudNativePG Operator instead of the Bitnami HA chart. The operator provides:
-
True Kubernetes-native high availability
-
Automated failover with zero data loss
-
Built-in streaming replication
-
Comprehensive backup and recovery
-
Superior monitoring and observability
-
Production-grade security and networking
Demo/Development HA Installation
For development and demo environments requiring basic HA, bitnami/postgresql-ha can be used for quick setup.
Demo HA Installation
Add bitnami repo to helm:
1 | |
Install PostgreSQL HA release for demo/development:
1 2 | |
Note:
-
The default configuration in
postgresql-ha-values.yamlusesbitnamilegacyDocker images for compatibility -
This setup provides basic HA but is not recommended for production use
NB: the value postgresqlha.enabled for waldur release must be true.
Chart configuration
You can change default PostgreSQL config with
the following variables in values.yaml (postgresql-ha-values.yaml file):
-
postgresql.database- name of a database.NB: must match
postgresqlha.postgresql.databasevalue inwaldur/values.yaml -
postgresql.username- name of a database user.NB: must match
postgresqlha.postgresql.usernamevalue inwaldur/values.yaml -
postgresql.password- password of a database user -
postgresql.replicaCount- number of db replicas -
postgresql.repmgrPassword- password ofrepmgruser -
persistence.size- size of a database (for each replica) -
pgpool.image.tag- tag ofPgpoolimage.Possible tags for default image can be found here
-
postgresql.image.tag- tag ofPostgreSQLimage.Possible tags for default image can be found here
More information related to possible values here.
Important:
-
The PostgreSQL HA configuration uses legacy Bitnami images (
bitnamilegacy/postgresql-repmgrandbitnamilegacy/pgpool) for demo/development compatibility -
These images are configured in the
postgresql-ha-values.yamlfile -
For production deployments, migrate to the CloudNativePG Operator which provides superior HA capabilities
Demo HA Dependency Installation
Waldur Helm chart supports PostgreSQL HA installation as a dependency.
For this, set postgresqlha.enabled to true and update related settings in postgresqlha section in waldur/values.yaml
NB: the value postgresql.enabled and externalDB.enabled must be false.
Prior Waldur installation, update chart dependencies:
1 | |