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 | 03 May 2024 | |
14/edge | 248 | 03 May 2024 |
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:
Profiles
Charmed PostgreSQL K8s resource utilization depends on the chosen profile:
juju deploy postgresql-k8s --trust --config profile=testing
Profile values
Value | Description | Tech details |
---|---|---|
production (default) |
Maximum performance | 25% of the available memory for shared_buffers and the remain as cache memory (defaults mimic legacy charm behavior).The max_connections =max(4 * os.cpu_count(), 100).Use pgbouncer if max_connections are not enough (reasoning). |
testing |
Minimal resource usage | PostgreSQL 14 defaults. |
Config change
Note: Pre-deployed application profile change is planned but currently is NOT supported.
To change the profile, use juju config
(see all charm configs):
juju deploy postgresql-k8s --trust --config profile=testing && \
juju config postgresql-k8s profile=production
Juju Constraints
Juju constraints allows RAM/CPU limits for Kubernetes pods:
juju deploy postgresql-k8s --trust --constraints cores=8 mem=16G
Juju constraints can be used together with charm profile:
juju deploy postgresql-k8s --trust --constraints cores=8 mem=16G --config profile=testing