postgresql #9
Deploy this charm on Kubernetes with the CLI. Find out how by reading the docs.
Description
PostgreSQL charm for Kubernetes deployments.
- Tags:
- databases ›
- k8s ›
PostgreSQL Operator
Description
Charm for Juju to deploy and manage PostgreSQL in a Kubernetes environment. Multiple units will provision a single master and remaining units as hot standby servers. Automatic failover will occur if a database goes down and there are enough remaining units for form a quorum, managed by repmgrd.
Usage
Provision a Juju environment and a k8s model, per Juju documentation. Then to deploy 3 units (pods) using the default image, simply:
juju deploy -n3 cs:~postgresql-charmers/postgresql-k8s postgresql
Client charms needing to connect with PostgreSQL should use the ops-lib-pgsql library to manage the relation.
Scale Out Usage
To horizontally scale, adding more read-only standbys:
juju add-unit postgresql
Note that this charm provides standard PostgreSQL, with a single read/write master node. Adding more nodes can only provide extra read-only capacity, and only to clients making use of the hot standby connection details (which will be load balanced over all available hot standby databases).
Testing
Just run make test
.
For more details, see here.
Configuration
- image
- (string) The location of the image to use, e.g. "registry.example.com/pgcharm:v1". This setting is required.
- stubcan/pgcharm:edge
- image_password
- (string) Password to use for the configured image registry, if required
- image_username
- (string) Username to use for the configured image registry, if required