postgresql-k8s

Charmed PostgreSQL K8s

Channel Revision Published Runs on
latest/stable 20 20 Sep 2022
Ubuntu 20.04
14/stable 495 18 Feb 2025
Ubuntu 22.04
14/stable 494 18 Feb 2025
Ubuntu 22.04
14/candidate 495 11 Feb 2025
Ubuntu 22.04
14/candidate 494 11 Feb 2025
Ubuntu 22.04
14/beta 495 06 Feb 2025
Ubuntu 22.04
14/beta 494 06 Feb 2025
Ubuntu 22.04
14/edge 508 Today
Ubuntu 22.04
14/edge 507 Today
Ubuntu 22.04
16/edge 496 06 Feb 2025
Ubuntu 24.04
juju deploy postgresql-k8s --channel 14/stable
Show information

Platform:

Interfaces/endpoints

The charm supports modern postgresql_client and legacy pgsql interfaces (in a backward compatible mode).

Note: do NOT relate both modern and legacy interfaces simultaneously!

Modern interfaces

This charm provides modern ‘postgresql_client’ interface. Applications can easily connect PostgreSQL using ‘data_interfaces’ library from ‘data-platform-libs’.

Modern postgresql_client interface (database endpoint):

Adding a relation is accomplished with juju relate (or juju integrate for Juju 3.x) via endpoint database. Example:

# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql-k8s -n 3 --trust --channel 14

# Deploy the relevant application charms
juju deploy mycharm

# Relate PostgreSQL with your application
juju relate postgresql-k8s:database mycharm:database

# Check established relation (using postgresql_client interface):
juju status --relations

# Example of the properly established relation:
# > Relation provider          Requirer          Interface          Type
# > postgresql-k8s:database    mycharm:database  postgresql_client  regular

Find all details about default and extra DB user roles in “Charm Users explanations”.

Legacy interfaces

Note: Legacy relations are deprecated and will be discontinued on future releases. Usage should be avoided. Check the legacy interface implementation limitations in the “Legacy charm” document.

Legacy pgsql interface (db and db-admin endpoints):

This charm supports legacy interface pgsql from the previous PostgreSQL charm:

juju deploy postgresql-k8s --trust --channel 14
juju deploy finos-waltz-k8s --channel edge
juju relate postgresql-k8s:db finos-waltz-k8s

Note: The endpoint db-admin provides the same legacy interface pgsql with PostgreSQL admin-level privileges. It is NOT recommended to use it from security point of view.


Help improve this document in the forum (guidelines). Last updated 1 year, 2 months ago.