Interfaces and endpoints¶
This charm provides the modern ‘postgresql_client’ interface . Applications can easily connect PostgreSQL using ‘data_interfaces’ library from ‘data-platform-libs’ .
See also: Integrate with your charm.
Adding a relation is accomplished with juju integrate via the database endpoint.
For example:
# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql -n 3 --channel 16/stable
# Deploy the relevant application charms
juju deploy <my-charm>
# Relate PostgreSQL with your application
juju integrate postgresql:database <my-charm>:database
# Check established relation (using postgresql_client interface):
juju status --relations
# Example of a properly established relation:
# > Relation provider Requirer Interface Type
# > postgresql:database <my-charm>:database postgresql_client regular
# Deploy Charmed PostgreSQL cluster with 3 nodes
juju deploy postgresql-k8s --channel 16/stable -n 3 --trust
# Deploy the relevant application charms
juju deploy <my-charm>
# Relate PostgreSQL with your application
juju integrate postgresql-k8s:database <my-charm>:database
# Check established relation (using postgresql_client interface):
juju status --relations
# Example of a properly established relation:
# > Relation provider Requirer Interface Type
# > postgresql-k8s:database <my-charm>:database postgresql_client regular
See the Users page for more details about default and additional database user roles.