Postgresql K8S

juju deploy cs:postgresql-k8s
Show information
Channel Version Platform
latest/stable 5
Kubernetes
latest/candidate 5
Kubernetes
latest/beta 5
Kubernetes
latest/edge 5
Kubernetes

Platform:

About

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others, and exceptional documentation (http://www.postgresql.org/docs/manuals/). This charm supports high availability PostgreSQL 12 in Kubernetes environments, using k8s services for load balancing and repmgrd to handle failover (https://repmgr.org). Read more


Discuss this charm

Share your thoughts on this charm with the community on discourse.

Join the discussion

PostgreSQL Juju Charm for k8s

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 do 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.