Charmed PostgreSQL K8s
- By Canonical Data Platform
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 20 | 20 Sep 2022 | |
14/stable | 73 | 18 Apr 2023 | |
14/candidate | 73 | 18 Apr 2023 | |
14/beta | 73 | 18 Apr 2023 | |
14/edge | 92 | Yesterday |
juju deploy postgresql-k8s --channel 14/stable
You will need Juju 2.9 to be able to run this command. Learn how to upgrade to Juju 2.9.
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:
Charmed PostgreSQL K8s backup can be stored on any S3 compatible storage, e.g. on Ceph via RadosGW. The S3 access and configurations are managed with the s3-integrator charm. Deploy and configure the s3-integrator charm for RadosGW (click here to backup on AWS S3):
# Install MinIO client and create a bucket:
mc config host add dest https://radosgw.mycompany.fqdn <access-key> <secret-key> --api S3v4 --lookup path
mc mb dest/backups-bucket
juju deploy s3-integrator
juju run-action s3-integrator/leader sync-s3-credentials access-key=<access-key> secret-key=<secret-key> --wait
juju config s3-integrator \
endpoint="https://radosgw.mycompany.fqdn" \
bucket="backups-bucket" \
path="/postgresql" \
region="" \
s3-api-version="" \
s3-uri-style="path"
To pass these configurations to Charmed PostgreSQL, relate the two applications:
juju relate s3-integrator postgresql-k8s
You can create/list/restore backups now:
juju run-action postgresql-k8s/leader list-backups --wait
juju run-action postgresql-k8s/leader create-backup --wait
juju run-action postgresql-k8s/leader list-backups --wait
juju run-action postgresql-k8s/leader restore backup-id=<backup-id-here> --wait
You can also update your S3 configuration options after relating, using:
juju config s3-integrator <option>=<value>
The s3-integrator charm accepts many configurations - enter whatever configurations are necessary for your S3 storage.
Help us improve this documentation
Most of this documentation can be collaboratively discussed and changed on the respective topic in the doc category of the Charmhub forum. See the documentation guidelines if you’d like to contribute.