DEV.co
Open-Source Databases · CrunchyData

postgres-operator

PGO is a Kubernetes operator from Crunchy Data that automates the deployment and management of PostgreSQL clusters. It handles high availability, disaster recovery, backups, and monitoring through declarative configuration, making production Postgres on Kubernetes significantly easier to operate.

Source: GitHub — github.com/CrunchyData/postgres-operator
4.4k
GitHub stars
674
Forks
Go
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositoryCrunchyData/postgres-operator
OwnerCrunchyData
Primary languageGo
LicenseApache-2.0 — OSI-approved
Stars4.4k
Forks674
Open issues167
Latest releasev6.0.2 (2026-06-02)
Last updated2026-07-07
Sourcehttps://github.com/CrunchyData/postgres-operator

What postgres-operator is

Written in Go, PGO extends Kubernetes with custom resources to manage PostgreSQL cluster lifecycle, including automated failover via distributed consensus, pgBackRest-based backup/restore, TLS enforcement, pgMonitor integration, and support for asynchronous and synchronous replication across single or multiple clusters.

Quickstart

Get the postgres-operator source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/CrunchyData/postgres-operator.gitcd postgres-operator# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

High-Availability PostgreSQL on Kubernetes

Organizations running Kubernetes who need production-grade PostgreSQL with automated failover, pod anti-affinity rules, and multi-replica standby clusters across availability zones or regions.

Disaster Recovery and Backup Management

Teams requiring scheduled, versioned backups with retention policies and multi-destination support (S3, GCS, Azure, local storage), plus point-in-time restore capabilities for large databases.

GitOps-Driven Database Operations

DevOps teams using declarative infrastructure-as-code workflows who want to manage PostgreSQL cluster creation, scaling, updates, and configuration through version-controlled manifests.

Implementation considerations

  • Requires an active, supported Kubernetes cluster (1.24+); plan for operator namespace, RBAC, and persistent volume provisioning before deploying.
  • Installation references Crunchy Data's Developer Portal for container images; review licensing and distribution terms if using official Crunchy Postgres for Kubernetes distribution vs. building custom images.
  • Backup and restore workflows depend on pgBackRest and external object storage (S3, GCS, Azure); plan egress bandwidth and cross-region replication topology early.
  • High-availability failover uses distributed consensus; test failover behavior and pod anti-affinity rules in staging to avoid split-brain or performance surprises.
  • TLS is enforced by default; bring your own PKI/certificate management or rely on PGO's generated certificates; validate certificate rotation workflows in your environment.

When to avoid it — and what to weigh

  • Non-Kubernetes Deployments — If your infrastructure is VMs, bare metal, or cloud-hosted databases (RDS, Cloud SQL), PGO adds no value; use native cloud database services or traditional Postgres management tools instead.
  • Simple Single-Instance Postgres — Small teams or projects with basic, non-critical Postgres workloads will find PGO's operational overhead and Kubernetes requirement unnecessary; a managed cloud database is simpler.
  • Minimal DevOps Resources — Deploying and troubleshooting PGO requires Kubernetes expertise and ongoing operator maintenance; organizations without dedicated platform engineering should prefer managed services.
  • Strict License Restrictions — If your legal team forbids any operator dependencies or requires tight control over all system components, the need to integrate pgBackRest, pgBouncer, and pgMonitor may complicate compliance.

License & commercial use

Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license allowing commercial use, modification, and distribution with minimal restrictions.

Apache-2.0 permits commercial use, but note that the operator itself is open source; Crunchy Data offers Crunchy Postgres for Kubernetes (a commercial product bundling the operator with their PostgreSQL distribution and support). Using PGO alone is free; integrating with Crunchy's supported images or purchasing commercial support requires separate agreements. Review your specific licensing needs with Crunchy Data.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityHigh
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

PGO enforces TLS for all connections and runs containers with locked-down security contexts. Secrets are managed via Kubernetes; ensure your cluster's etcd and secret backend are encrypted and access-controlled. Network policies should restrict egress for backup operations. No specific CVE history or security audit details provided; evaluate operator's ServiceAccount RBAC privileges and periodically review releases for security patches.

Alternatives to consider

Citus (via Hyperscale on Azure or self-hosted)

Distributed PostgreSQL for sharded workloads; better if you need horizontal scaling for OLTP, but less suitable for traditional HA single-node replication.

CloudNativePG (EDB open source)

Alternative Kubernetes operator for PostgreSQL with similar HA/backup features; may have different defaults, performance characteristics, or vendor ecosystem expectations.

Managed Cloud Databases (RDS, Cloud SQL, Azure Database)

Eliminates operator and Kubernetes management overhead; best if you can accept vendor lock-in and don't need on-premises or multi-cloud Kubernetes deployment.

Software development agency

Build on postgres-operator with DEV.co software developers

Evaluate PGO if your team runs Kubernetes and needs production-grade Postgres with automated HA, backups, and monitoring. Start with the quickstart guide and join the Discord community for support.

Talk to DEV.co

Related 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.

postgres-operator FAQ

Can I run PGO outside of Kubernetes?
No. PGO is a Kubernetes operator and requires a Kubernetes cluster. If you need self-managed PostgreSQL without Kubernetes, use traditional Postgres tools or managed cloud services.
Do I need Crunchy Data's commercial support to use PGO?
No. PGO is open source under Apache-2.0 and can be used freely. However, Crunchy Data offers commercial support, training, and their Crunchy Postgres for Kubernetes product bundle which includes curated images and additional tools.
How does backup and restore work?
PGO uses pgBackRest for full, incremental, and differential backups. Backups can be stored in S3, GCS, Azure Blob Storage, or local Kubernetes storage. Restores are initiated declaratively and support point-in-time recovery.
What Kubernetes versions are supported?
Documentation references Kubernetes 1.24+; always check the official quickstart and release notes for the specific operator version you plan to deploy.

Software development & web development with DEV.co

Adopting postgres-operator is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.

Ready to Automate PostgreSQL on Kubernetes?

Evaluate PGO if your team runs Kubernetes and needs production-grade Postgres with automated HA, backups, and monitoring. Start with the quickstart guide and join the Discord community for support.