CloudNativePG is a comprehensive platform designed to seamlessly manage PostgreSQL databases within Kubernetes environments, covering the entire operational lifecycle from initial deployment to ongoing maintenance https://cloudnative-pg.io
  • Go 97.7%
  • Shell 1.9%
  • Makefile 0.3%
Find a file
2026-03-03 19:26:33 +01:00
.devcontainer fix(.devcontainer): disable moby feature for trixie (#8750) 2025-10-05 14:54:41 +02:00
.github chore(deps): update dependency golang to v1.26.0 (main) (#9986) 2026-03-03 15:00:42 +01:00
api/v1 feat: support PostgreSQL extensions in image catalogs (#9781) 2026-03-02 09:15:58 +01:00
cmd feat(ip): assign copyright to the Linux Foundation (#7203) 2025-03-26 07:36:12 +01:00
config feat: support PostgreSQL extensions in image catalogs (#9781) 2026-03-02 09:15:58 +01:00
contribute ci(k3d): add support to run e2e tests using k3d (#9912) 2026-02-27 18:20:22 +01:00
docs feat: support PostgreSQL extensions in image catalogs (#9781) 2026-03-02 09:15:58 +01:00
hack ci(k3d): add support to run e2e tests using k3d (#9912) 2026-02-27 18:20:22 +01:00
internal chore(lint): fix warnings from golangci-lint v2.10.1 (#10008) 2026-03-03 13:06:19 +01:00
licenses/go-licenses chore: refresh licenses directory (#9939) 2026-02-09 20:06:05 +04:00
pkg chore(lint): fix warnings from golangci-lint v2.10.1 (#10008) 2026-03-03 13:06:19 +01:00
releases Version tag to 1.28.1 (#9914) 2026-02-05 15:32:51 +01:00
tests chore(lint): fix warnings from golangci-lint v2.10.1 (#10008) 2026-03-03 13:06:19 +01:00
.dockerignore feat: add multiarch build for the operator 2021-09-22 18:58:07 +02:00
.gitignore ci(release): sign rpm and deb packages (#5507) 2024-09-23 10:43:00 +02:00
.golangci.yml chore(lint): fix warnings from golangci-lint v2.10.1 (#10008) 2026-03-03 13:06:19 +01:00
.goreleaser.yml chore: enable SBOMs within GoReleaser (#10074) 2026-02-25 22:34:45 +01:00
.snyk chore: added Snyk exclude rules (#2254) 2023-06-13 15:50:48 +02:00
.spellcheck.yaml chore: remove unknown fields and improve CSV specs (#6107) 2024-12-03 09:29:32 +01:00
.woke.yaml test: add E2E test to upgrade from the version under test (#3624) 2024-01-16 14:38:39 +01:00
.wokeignore chore: scan operator image using Dockle and Snyk (#3300) 2023-11-14 18:33:35 +08:00
.wordlist-en-custom.txt feat: support PostgreSQL extensions in image catalogs (#9781) 2026-03-02 09:15:58 +01:00
ADOPTERS.md chore: add GARR to ADOPTERS.md (#9742) 2026-01-16 17:40:15 +01:00
CODE_OF_CONDUCT.md docs: Adopt the governance repository (#4455) 2024-05-08 10:19:10 +02:00
CODEOWNERS chore: add Niccolò as OLM component owner (#4554) 2024-05-16 17:26:45 +02:00
CONTRIBUTING.md docs: point to the governance CONTRIBUTING.md file (#10102) 2026-03-02 13:31:48 +01:00
DEPENDENCIES.md chore: introduce Dependency Management Policy (DEPENDENCIES.md) (#10066) 2026-02-26 11:07:16 +01:00
docker-bake.hcl chore: fix broken links to old current documentation (#9722) 2026-01-15 12:06:30 +11:00
Dockerfile chore(deps): update container distroless digests (main) (#9700) 2026-01-13 14:22:07 +01:00
go.mod chore(deps): update dependency go to v1.26.0 (main) (#9982) 2026-03-03 19:26:33 +01:00
go.sum fix(deps): update kubernetes patches (main) (#9958) 2026-02-11 15:17:24 +04:00
GOVERNANCE.md docs: Adopt the governance repository (#4455) 2024-05-08 10:19:10 +02:00
LICENSE feat: adopt open source license and change IP assignment 2022-04-21 14:42:57 +02:00
MAINTAINERS.md docs: Adopt the governance repository (#4455) 2024-05-08 10:19:10 +02:00
Makefile refactor: consolidate run-e2e scripts and detect storage classes in Go (#10013) 2026-02-19 14:26:56 +01:00
PROJECT feat: introduce experimental support for failover quorum (#7572) 2025-07-29 12:14:23 +02:00
README.md chore: add OpenSSF Baseline badge (#10055) 2026-02-26 12:17:13 +11:00
ROADMAP.md docs: roadmap change process (#9127) 2025-11-11 11:09:30 +01:00
SECURITY-INSIGHTS.yml chore: add SLSA provenance to release binaries and container images (#10048) 2026-03-02 09:24:22 +11:00
SECURITY.md chore: fix broken links to old current documentation (#9722) 2026-01-15 12:06:30 +11:00
SUPPORT.md docs: provide guidelines for commercial support (#5712) 2024-10-07 11:46:30 +02:00

CNCF Landscape Latest Release GitHub License OpenSSF Best Practices OpenSSF Baseline OpenSSF Scorecard Badge Documentation Stack Overflow FOSSA Status CLOMonitor Artifact Hub

Welcome to the CloudNativePG Project!

CloudNativePG (CNPG) is an open-source platform designed to seamlessly manage PostgreSQL databases in Kubernetes environments. It covers the entire operational lifecycle—from deployment to ongoing maintenance—through its core component, the CloudNativePG operator.

Table of Contents

Getting Started

The best way to get started is the Quickstart Guide.

Scope

Mission

CloudNativePG aims to increase PostgreSQL adoption within Kubernetes by making it an integral part of the development process and GitOps-driven CI/CD automation.

Core Principles & Features

Designed by PostgreSQL experts for Kubernetes administrators, CloudNativePG follows a Kubernetes-native approach to PostgreSQL primary/standby cluster management. Instead of relying on external high-availability tools (like Patroni, repmgr, or Stolon), it integrates directly with the Kubernetes API to automate database operations that a skilled DBA would perform manually.

Key design decisions include:

  • Direct integration with Kubernetes API: The PostgreSQL clusters status is available directly in the Cluster resource, allowing users to inspect it via the Kubernetes API.
  • Operator pattern: The operator ensures that the desired PostgreSQL state is reconciled automatically, following Kubernetes best practices.
  • Immutable application containers: Updates follow an immutable infrastructure model, as explained in "Why EDB Chose Immutable Application Containers".

How CloudNativePG Works

The operator continuously monitors and updates the PostgreSQL cluster state. Examples of automated actions include:

  • Failover management: If the primary instance fails, the operator elects a new primary, updates the cluster status, and orchestrates the transition.
  • Scaling read replicas: When the number of desired replicas changes, the operator provisions or removes resources such as persistent volumes, secrets, and config maps while managing streaming replication.
  • Service updates: Kubernetes remains the single source of truth, ensuring that PostgreSQL service endpoints are always up to date.
  • Rolling updates: When an image is updated, the operator follows a rolling strategy—first updating replica pods before performing a controlled switchover for the primary.

CloudNativePG manages additional Kubernetes resources to enhance PostgreSQL management, including: Backup, ClusterImageCatalog, Database, ImageCatalog, Pooler, Publication, ScheduledBackup, and Subscription.

Out of Scope

  • Kubernetes only: CloudNativePG is dedicated to vanilla Kubernetes maintained by the Cloud Native Computing Foundation (CNCF).
  • PostgreSQL only: CloudNativePG is dedicated to vanilla PostgreSQL maintained by the PostgreSQL Global Development Group (PGDG).
  • No support for forks: Features from PostgreSQL forks will only be considered if they can be integrated as extensions or pluggable frameworks.
  • Not a general-purpose database operator: CloudNativePG does not support other databases (e.g., MariaDB).

CloudNativePG can be extended via the CNPG-I plugin interface.

Communications

Resources

Adopters

A list of publicly known users of the CloudNativePG operator is in ADOPTERS.md. Help us grow our community and CloudNativePG by adding yourself and your organization to this list!

CloudNativePG at KubeCon


We are a Cloud Native Computing Foundation Sandbox project.

CNCF logo


CloudNativePG was originally built and sponsored by EDB.

EDB logo


Postgres, PostgreSQL, and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.