cloudnative-pg
CloudNativePG is an open-source Kubernetes operator that automates PostgreSQL database management within Kubernetes clusters, handling deployment, scaling, failover, and disaster recovery. It integrates directly with the Kubernetes API rather than relying on external HA tools, making PostgreSQL operations cloud-native.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | cloudnative-pg/cloudnative-pg |
| Owner | cloudnative-pg |
| Primary language | Go |
| License | Apache-2.0 — OSI-approved |
| Stars | 8.9k |
| Forks | 721 |
| Open issues | 391 |
| Latest release | v1.30.0 (2026-06-29) |
| Last updated | 2026-07-08 |
| Source | https://github.com/cloudnative-pg/cloudnative-pg |
What cloudnative-pg is
A Go-based Kubernetes operator that manages PostgreSQL clusters through custom resources (Cluster, Backup, ScheduledBackup, Pooler, etc.), automating failover, rolling updates, streaming replication, and backup orchestration. The operator follows immutable infrastructure patterns and exposes cluster state directly via the Kubernetes API.
Get the cloudnative-pg source
Clone the repository and explore it locally.
git clone https://github.com/cloudnative-pg/cloudnative-pg.gitcd cloudnative-pg# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Kubernetes 1.x environment (version requirement not explicitly stated in excerpt; verify current minimum). Operator must be deployed as a Pod or DaemonSet.
- PostgreSQL cluster state is defined declaratively via Cluster CRD; changes trigger reconciliation loops. Understand desired vs. actual state patterns before deploying to production.
- Backup and disaster recovery strategy must be configured upfront via Backup and ScheduledBackup resources; no defaults assumed for retention or recovery targets.
- Persistent storage provisioning is delegated to Kubernetes storage classes. Ensure adequate PV/PVC capacity and performance tuning aligned with PostgreSQL workload.
- Rolling updates and switchovers are automated but should be tested in non-production first; understand the operator's rolling strategy and potential downtime windows.
When to avoid it — and what to weigh
- PostgreSQL forks or non-vanilla PostgreSQL — Project explicitly supports only vanilla PostgreSQL from PGDG. PostgreSQL forks or modified distributions are out of scope unless integrated as extensions.
- Non-Kubernetes database deployments — CloudNativePG is Kubernetes-only and will not work for on-premise VMs, bare metal, or non-Kubernetes container orchestration platforms.
- Multi-database management — This is a PostgreSQL-specific operator. If you need to manage multiple database engines (MySQL, MariaDB, MongoDB, etc.), a general-purpose database operator is required.
- Organizations without Kubernetes expertise — Requires solid Kubernetes operational knowledge. Teams unfamiliar with operators, CRDs, and Kubernetes API patterns will face a steep learning curve.
License & commercial use
Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license allowing commercial use, modification, and redistribution under the stated terms. No proprietary restrictions.
Apache-2.0 permits commercial use without license fees. Commercial support is offered separately (cloudnative-pg.io/support/). Verify support SLA and terms independently for production deployments. License does not indemnify against PostgreSQL licensing; verify PostgreSQL licensing separately.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | High |
| DEV.co fit | Strong |
| Assessment confidence | High |
Project maintains OpenSSF Best Practices and Baseline badges and OpenSSF Scorecard, indicating security development practices are in place. Operator runs in-cluster with RBAC permissions; verify least-privilege role bindings. No exploit details available in provided data. Conduct threat modeling for backup storage, TLS for replication, and authentication (Keycloak integration mentioned in KubeCon talks). Secrets management for PostgreSQL credentials delegated to Kubernetes; ensure Secret encryption at rest is configured.
Alternatives to consider
Patroni
Standalone HA toolkit for PostgreSQL that does not require Kubernetes; used by many on-premise deployments. Less Kubernetes-native but more portable across infrastructure.
Percona Distribution for PostgreSQL Operator (PG operator by Percona)
Alternative Kubernetes operator for PostgreSQL with focus on monitoring, backup, and disaster recovery. Requires evaluation of feature parity and Kubernetes integration depth.
Timescale Cloud or AWS RDS for PostgreSQL
Build on cloudnative-pg with DEV.co software developers
Start with the CloudNativePG Quickstart Guide. Assess your Kubernetes expertise, storage setup, and disaster recovery requirements before production deployment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
cloudnative-pg FAQ
Does CloudNativePG support PostgreSQL version X?
Can I use CloudNativePG with managed Kubernetes (EKS, GKE, AKS)?
What happens to data if a cluster Pod fails?
Is commercial support available?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like cloudnative-pg into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source devops stack.
Ready to run PostgreSQL on Kubernetes?
Start with the CloudNativePG Quickstart Guide. Assess your Kubernetes expertise, storage setup, and disaster recovery requirements before production deployment.