# CloudNativePG

CloudNativePG is an open-source Kubernetes operator for PostgreSQL that automates deployment, backups, upgrades, failover, and monitoring for platform and database teams. It is open source and self-hosted, installable on Docker Hub and Kubernetes (Helm).

Canonical page: https://ourlocalhost.com/app/4652/cloudnativepg

## Description

CloudNativePG is an open-source Kubernetes operator for PostgreSQL that automates deployment, backups, upgrades, failover, and monitoring for platform and database teams.

## Platform availability

Available on 1 of 6 install platforms: Helm.

## Health score

76/100 (Good), based on 3 of 4 factors.
- Maintained: 100 (last commit 8 days ago)
- Popular: 79 (9,376 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)

## Links

- GitHub: https://github.com/cloudnative-pg/cloudnative-pg
- Docker Hub: https://hub.docker.com/r/bitnami/cloudnative-pg
- Kubernetes (Helm): https://artifacthub.io/packages/helm/cloudnative-pg/cloudnative-pg
- Official website: https://cloudnative-pg.io
- Documentation: https://cloudnative-pg.io/docs

## Common questions

### Does CloudNativePG rely on StatefulSets for PostgreSQL data volumes?

No. It manages the persistent volume claims for PGDATA itself instead of relying on StatefulSets.

### Why do documentation examples with kubectl cnpg fail on my cluster?

You need the kubectl cnpg plugin installed. Run the installation script with sudo so it is placed in /usr/local/bin; the plugin provides status, logs, and psql shortcuts used by the docs.

### How can I tell whether a CloudNativePG backup is running?

Run kubectl describe backup and look for Phase: running. If it is stuck, check the Events section to find the cause.

### Why are the monitoring services unreachable from outside the cluster?

Grafana, Alertmanager, the monitoring operator, and Prometheus are ClusterIP services by default, so they are reachable only inside the cluster. Use port-forwarding or expose a service if you need access from your home network.

### How does CloudNativePG handle primary failover?

The operator handles failover directly through the Kubernetes API. If the primary fails, it elects a new primary and orchestrates the transition without an external HA tool.

### Does CloudNativePG support TLS for database connections?

Yes. It implements in-transit encrypted TLS connections and supports security contexts by default.

---
Source: Our Local Host (https://ourlocalhost.com/app/4652/cloudnativepg), the self-hosted and open-source app directory.
