CloudNativePG
The CloudNativePG operator turns a Cluster resource into a running Postgres. It runs one database today: n8n’s. Upstream docs.
| Namespace | cnpg-system (operator); clusters live in each app’s namespace |
| Source | cnpg.go |
| Exposure | — |
| Storage | Per cluster; n8n’s is 10Gi on longhorn |
| Auth | — |
Why an operator rather than the chart’s bundled Postgres: CloudNativePG for app databases.
How it fits
Section titled “How it fits”For a Cluster named <name>, the operator creates the Secret <name>-app (app user’s credentials) and the Service <name>-rw (primary). Apps read the password from that Secret, so it is the one credential not stored in OpenBao. The n8n page has the Cluster spec.
The chart runs with default values.
Operate
Section titled “Operate”The operand image is set per cluster with imageName. A minor bump within one major is an in-place rolling update; a major bump needs a new cluster or pg_upgrade.
Troubleshooting
Section titled “Troubleshooting”Cluster stuck in Creating
Section titled “Cluster stuck in Creating”kubectl describe cluster n8n-pg -n n8nkubectl logs -n cnpg-system -l app.kubernetes.io/name=cloudnative-pg --tail=50Pod pending on its PVC
Section titled “Pod pending on its PVC”Longhorn cannot place the volume: kubectl describe pvc -n n8n, then check Longhorn.