CloudNativePG
- Website
- GitHub
- Golang
- 6k stars, 160 contributors
- Official Helm chart
- Docs
Setup
- Add a
Clusterresource - cnpg creates a secret
<clustername>-appwith cluster credentials (Defaults: username:app, dbname:app)
Major version upgrades
- Docs: Major version upgrades
- The Offline In-Place Major Upgrades method introducted in v1.26.0 (2025-06) seems to work fully automated
- But: Trying to upgrade a cluster from v13 to v14 resulted in:
major upgrades are only supported to version 16 or higher
- Upgrading from v13 to v16 worked !
Backup
Cnpg plugin for kubectl
Install:
pamac install kubectl-cnpg
kubectl -n varac get cluster
kubectl cnpg -n varac status cloudnative-pg-test
Use psql:
$ kubectl -n umami exec -it cnpg-umami-1 -c postgres -- bash
> \l
> \c app
> \dt