Charmed PostgreSQL K8s
- By Canonical Data Platform
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 20 | 20 Sep 2022 | |
14/stable | 193 | 13 Mar 2024 | |
14/candidate | 248 | Yesterday | |
14/beta | 248 | Yesterday | |
14/edge | 248 | Yesterday |
juju deploy postgresql-k8s --channel 14/edge
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
How to manage integrated applications
Note: All commands are written for juju >= v.3.0
If you are using an earlier version, be aware that:
juju run
replacesjuju run-action --wait
injuju v.2.9
juju integrate
replacesjuju relate
andjuju add-relation
injuju v.2.9
For more information, check the Juju 3.0 Release Notes.
Create an integration
New postgresql_client
interface
Integrations (or “relations” in juju v.2.9
) with new applications are supported via the postgresql_client interface.
To create an integration, run
juju integrate postgresql-k8s application
To remove an integration:
juju remove-relation postgresql-k8s application
Legacy pgsql
interface
We have also added support for the database legacy relation from the original version of the charm via the pgsql
interface. Note that this interface is deprecated.
juju integrate postgresql-k8s:db mattermost-k8s:db
Extended permissions can be requested using the db-admin
endpoint:
juju integrate postgresql-k8s:db-admin mattermost-k8s:db
Rotate application passwords
To rotate the passwords of users created for integrated applications, the integration should be removed and integrated again. This process will generate a new user and password for the application.
juju remove-relation application postgresql-k8s
juju add-relation application postgresql-k8s
Internal operator user
The operator
user is used internally by the Charmed PostgreSQL K8s Operator. The set-password
action can be used to rotate its password.
To set a specific password for the operator
user, run
juju run postgresql-k8s/leader set-password password=<password>
To randomly generate a password for the operator
user, run
juju run postgresql-k8s/leader set-password