Deploy production-grade PostgreSQL clusters in minutes. Automate high availability with Patroni, WAL-based PITR backups, and minimal downtime upgrades — all through Kubernetes-native APIs.
Data Loss on Failover (Sync)
High Availability Target (3 Replicas)
Pre-installed Extensions
Open Source
Deploy PostgreSQL in 3 steps
Install KubeBlocks
# Add Helm repo helm repo add kubeblocks https://apecloud.github.io/helm-charts helm repo update # Install KubeBlocks helm install kubeblocks kubeblocks/kubeblocks \ --namespace kb-system --create-namespace
Create a PostgreSQL Cluster
apiVersion: apps.kubeblocks.io/v1 kind: Cluster metadata: name: pg-cluster namespace: demo spec: terminationPolicy: Delete clusterDef: postgresql topology: replication componentSpecs: - name: postgresql replicas: 3
Check Cluster Status
kubectl get cluster pg-cluster -n demo NAME CLUSTER-DEFINITION STATUS AGE pg-cluster postgresql Running 2m
Trusted by Engineering Teams at Scale
KubeBlocks runs PostgreSQL with Patroni for leader election, using the Kubernetes API or a provided etcd as the Distributed Configuration Store.
One primary with one or more streaming replicas managed by Patroni. Leader election uses a Kubernetes ConfigMap lease or an externally provided etcd. On failure, Patroni automatically promotes the most up-to-date replica and KubeBlocks updates the Kubernetes Service selector to route traffic to the new primary.
Patroni-driven leader election via Kubernetes API
Streaming WAL replication — sync or async configurable
Zero data loss on failover (synchronous commit)
Built-in pgbouncer for connection pooling on :6432
Automatic service endpoint switch on primary change
pg-exporter sidecar for Prometheus metrics on :9187
pg-cluster-postgresql-postgresql:5432pg-cluster-postgresql-postgresql:6432 (pgbouncer)kubeblocks.io/role=primary| Feature | KubeBlocksThis | CloudNativePG | Zalando Operator | CrunchyData PGO |
|---|---|---|---|---|
| Open Source | ✓ | ✓ | ✓ | ✓ |
| Patroni-based HA | ✓ | ✗ Uses its own HA controller, not Patroni | ✓ | ✓ |
| Standby cluster (cross-k8s DR) | Enterprise | ✓ | ~ | ✓ |
| Built-in connection pooler | ✓ | ✓ | ✓ | ✓ |
| PITR (WAL streaming) | ✓ | ✓ | ✓ | ✓ |
| Horizontal scaling | ✓ | ✓ | ✓ | ✓ |
| Minor version upgrade | ✓ | ✓ | ✓ | ✓ |
| Major version upgrade | Enterprise Via blue-green deployment | ✗ | ~ | ✓ Via pg_upgrade |
| TLS in-place rotation | ✓ | ✓ | ~ | ✓ |
| Prometheus metrics | ✓ | ✓ | ✓ | ✓ |
| DB / role management | Enterprise | ✓ | ✓ | ✓ |
| Logical replication management | ~ | ✓ | ~ | ~ |
| Bootstrap from external PG | Enterprise | ✓ | ~ | ~ |
| Web management UI | Enterprise | ✗ | ✓ | ✓ |
| pgvector / PostGIS support | ✓ Pre-installed | ✓ Via custom image | ✓ Via custom image | ✓ Pre-installed |
✓ = Supported · ~ = Partial / Limited · ✗ = Not supported
Enterpriseindicates a capability available in KubeBlocks Enterprise, not the open-source distribution. Contact us for licensing →
Based on publicly available documentation. Features may vary by version.
KubeBlocks automates the hardest parts of running PostgreSQL on Kubernetes — so your team doesn't have to.
Our benchmark shows KubeBlocks-managed PostgreSQL on Kubernetes delivers highly stable performance with zero TPS drops during checkpoints, matching or exceeding bare-metal deployments.
≈ Bare-VM
Throughput (TPS)
KubeBlocks PostgreSQL matches bare-VM throughput — Kubernetes adds no measurable overhead.
0
Kubernetes Performance Tax
With proper parameter tuning, running PostgreSQL on Kubernetes introduces no performance degradation.
Zero
TPS Jitters During Checkpoints
Optimized WAL and filesystem configurations eliminate TPS drops during PostgreSQL checkpoint flushes.
No SSH into pods, no shell scripts. Submit an OpsRequest and KubeBlocks handles the rest.
High Availability & Scaling
Horizontal Scaling
Add or remove replicas online without downtime or reconfiguration.
Vertical Scaling
Resize CPU and memory on running instances with a rolling strategy.
Volume Expansion
Expand PVC storage without pod restarts on supported storage classes.
Rolling Restart
Controlled pod restarts with minimal disruption.
Planned Switchover
Promote a specific replica to primary via Patroni with zero data loss when configured for synchronous replication.
Stop / Start
Suspend clusters to eliminate compute cost; resume with full state.
Configuration, Extensions & Observability
Dynamic Configuration
Tune PostgreSQL parameters via OpsRequest — no restart for supported GUCs.
TLS Encryption
Enable, rotate, or disable in-flight encryption without downtime.
Password Management
Rotate superuser and custom account credentials stored in Kubernetes Secrets.
Minor Version Upgrade
Rolling upgrades across minor PostgreSQL versions with health checks.
pg_exporter Metrics
Per-instance metrics via pg_exporter on :9187, Grafana dashboards included.
Pre-installed Extensions
pgvector, PostGIS, pg_stat_statements, pg_trgm, and 7+ more ready to use.
Open source and production-ready. Enterprise customers get dedicated onboarding, migration support, and SLA guarantees.