Free audit

View Audit Scope
PostgreSQL on Kubernetes · CNPG · Zalando · Crunchy PGOCloudNativePG · Local NVMe CSI · Barman S3 · Pooler CRDs

PostgreSQL on Kubernetes Architecture & Operations.

We design, harden, and operate production PostgreSQL clusters on EKS, GKE, AKS, and bare-metal Kubernetes. Our senior engineers combine deep PostgreSQL internals with Kubernetes operator mastery across CloudNativePG (CNPG), Zalando Postgres Operator, and Crunchy Data PGO, complete with dedicated WAL / NVMe CSI storage and Barman Cloud / pgBackRest S3 PITR.
  • CloudNativePG (CNPG)
  • Zalando Postgres Operator
  • Crunchy Data PGO
  • Local NVMe & EBS/PD CSI tuning
  • Barman Cloud & pgBackRest S3 PITR
  • PgBouncer Pooler CRDs & GitOps

k8s-postgresql-operators

4 Kubernetes PostgreSQL pillars we run

CloudNativePG (CNPG)

ok

CNCF-aligned operator managing primary/standby PVCs directly via Kubernetes API leases without external StatefulSets or sidecar DCS.

Explore details

Eliminate cgroup OOMKills, PVC multi-attach stalls, and node-drain outages.

P1 Incident Response
15 mins

24/7 for K8s operator & DB emergencies

Operator Ecosystems
CNPG · Zalando · PGO

Declarative GitOps CRDs with native Kubernetes lease consensus

Storage Architecture
NVMe CSI + WAL Split

Shared-nothing zone-pinned PVCs with dedicated walStorage volumes

Disaster Recovery
Barman Cloud + pgBackRest

Continuous S3/GCS/Azure WAL shipping plus VolumeSnapshot PITR

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

01 · Why Stateful PostgreSQL Breaks on Unhardened Kubernetes

Six Kubernetes database failure modes we engineer out.

Kubernetes was originally built for stateless pods. Running high-throughput PostgreSQL on Kubernetes requires aligning Linux cgroup memory accounting, CSI storage semantics, and node lifecycle hooks with PostgreSQL internals.

Kubernetes Production SymptomArchitectural Root CauseJusDB Engineering Remediation
PostgreSQL pods get OOMKilled by kubelet during parallel queries or checkpointsKubernetes cgroup memory limits count Linux page cache and PostgreSQL shared memory together; if shared_buffers + (work_mem * active sorts) + page cache exceed resources.limits.memory, the Linux OOM killer terminates the postmaster.Run PostgreSQL pods with dedicated QoS resource allocations (requests == limits) on isolated database node pools, size shared_buffers to 25-30% of container memory, and cap max_connections behind a Pooler CRD.
Cluster node drain (kubectl drain / Karpenter) takes down primary and standby togetherMissing PodDisruptionBudgets (PDB), soft podAntiAffinity rules, or single-AZ PVC topology constraints allow the Kubernetes scheduler to co-locate cluster instances on the same worker node.Enforce requiredDuringSchedulingIgnoredDuringExecution podAntiAffinity across kubernetes.io/hostname and topology.kubernetes.io/zone, and configure operator-managed PDBs so drains trigger controlled switchovers first.
Multi-attach PVC errors stall failover for 6 to 10 minutes after worker node crashNetwork-attached cloud block volumes (AWS EBS, GCP PD, Azure Disk) remain attached to an unresponsive worker node until Kubernetes VolumeAttachment timeouts expire.Use CloudNativePG / Zalando / PGO architectures where each PostgreSQL instance owns an independent PVC (shared-nothing storage) and failover promotes a streaming standby immediately without re-mounting the dead node's disk.
High WAL fsync latency on default cloud CSI StorageClassesPGDATA and pg_wal share a single baseline CSI volume with untuned ext4/xfs mount options (barrier overhead, atime updates) and low IOPS limits.Provision dedicated high-IOPS StorageClasses (gp3/io2, pd-ssd/hyperdisk, or local NVMe via TopoLVM/OpenEBS LVM) with separate walStorage PVCs and noatime mount options.
Object-store WAL archiving silently fails after IAM / IRSA token rotationBarman Cloud, pgBackRest, or WAL-G containers lose S3/GCS/Azure Blob write permissions after Kubernetes ServiceAccount annotation changes, causing pg_wal to fill the primary PVC.Wire EKS IRSA, GKE Workload Identity, or AKS Managed Identity with continuous Prometheus alerts on cnpg_collector_up, archive_failed_count, and PVC disk utilization.
Unpinned container image tags trigger unintended minor upgrades during pod rescheduleSpecifying floating tags (such as postgres:16) causes newly scheduled standby pods to pull a newer image digest or incompatible extension version during node scale events.Pin immutable image digests or CloudNativePG ImageCatalog CRDs, and manage rolling minor upgrades through declarative operator rollout strategies.

02 · Kubernetes PostgreSQL Workstreams

Full-stack ownership across PostgreSQL and Kubernetes.

Most platform engineers know Kubernetes but not PostgreSQL internals; most traditional DBAs know SQL but not CSI drivers or CRDs. Our engineers bridge both layers seamlessly.

01

Operator Selection & Production CRD Design

We architect and deploy CloudNativePG (CNPG), Zalando Postgres Operator, or Crunchy Data PGO on EKS, GKE, AKS, and bare-metal OpenShift / Talos clusters.

  • CloudNativePG vs Zalando vs Crunchy PGO trade-off and fit assessment
  • Production Cluster CRDs with pinned QoS (requests == limits), node Taints/Tolerations, and anti-affinity
  • Custom container image builds bundling pgvector, PostGIS, TimescaleDB, and pgaudit
CloudNativePG · Zalando Spilo · Crunchy PGO · Helm / ArgoCD
PostgreSQL Architecture Consulting
02

CSI StorageClasses, Local NVMe & Kernel Tuning

Database performance on Kubernetes lives or dies at the storage and node layer. We engineer CSI StorageClasses and dedicated worker node groups for low-latency I/O.

  • Dedicated walStorage PVC separation for write-ahead logs
  • Local NVMe RAID / LVM provisioning (TopoLVM, OpenEBS) and cloud gp3/io2 CSI tuning
  • Worker node sysctl tuning (vm.swappiness, hugepages, dirty_background_bytes)
AWS EBS CSI · GCP PD CSI · TopoLVM · OpenEBS · xfs / ext4 noatime
PostgreSQL Performance Tuning
03

Barman Cloud, pgBackRest & Cross-Cluster PITR

When using fast local NVMe or zone-pinned PVCs, object-store backups are your primary durability anchor. We build and test continuous WAL archiving and PITR pipelines.

  • CloudNativePG Barman Cloud Plugin & ObjectStore CRD setup on S3, GCS, or Azure Blob
  • Crunchy PGO pgBackRest and Zalando WAL-G multi-repo backup configurations
  • Automated recovery bootstrap clusters to verify PITR restores on a schedule
Barman Cloud · pgBackRest · WAL-G · S3 / GCS / Azure Blob
PostgreSQL High Availability
04

Pooler CRDs, Service Routing & Read/Write Split

We deploy operator-managed PgBouncer Pooler CRDs and Kubernetes Service topologies (-rw, -ro, -r) so microservice pods never overwhelm PostgreSQL backends.

  • CloudNativePG Pooler CRD and Crunchy/Zalando PgBouncer transaction pooling
  • TLS mTLS certificate rotation between application pods, PgBouncer, and PostgreSQL
  • Cross-cluster or external client routing via Envoy, Cilium, or cloud NLBs
CNPG Pooler CRD · PgBouncer · cert-manager · Cilium / Envoy
PgBouncer Connection Pooling
05

Cloud-to-K8s Repatriation & Major Upgrades

Migrating from RDS/Aurora/Cloud SQL into Kubernetes for cost or multi-cloud portability? Or upgrading K8s PostgreSQL from 13/14 to 16/17? We execute rehearsed cutovers.

  • CNPG externalClusters bootstrap from RDS, Aurora, Cloud SQL, or legacy VMs
  • Declarative offline pg_upgrade or low-downtime logical replication upgrades
  • GitOps workflow integration with ArgoCD, Flux, and Kustomize
CNPG externalClusters · Logical Replication · pg_upgrade · ArgoCD
PostgreSQL Cloud Migration
06

Prometheus Observability & K8s DBA Support

We wire PodMonitor metrics, Grafana dashboards, and Alertmanager rules for every Kubernetes PostgreSQL cluster, backed by senior DBAs (24/7 on-call).

  • Custom Prometheus metric queries for XID age, replication lag, and WAL archive status
  • Chaos Mesh / node-drain GameDays to verify operator switchover timing
  • Direct escalation to engineers fluent in both PostgreSQL internals and kubectl
Prometheus PodMonitor · Grafana · Alertmanager · kubectl cnpg
PostgreSQL Managed Support

03 · Operator Comparison & Response SLA

CloudNativePG vs Zalando vs Crunchy PGO & P1-P3 response.

We support all three major open-source Kubernetes PostgreSQL operators and help you standardize on the right architecture, backed by published P1-P3 SLA response times.

Kubernetes OperatorPod & Storage ArchitectureFailover ConsensusBackup & PITR EcosystemPrimary Sweet Spot
CloudNativePG (CNPG)Native Kubernetes controller managing Pods & PVCs directly (no StatefulSet)Kubernetes API Server Lease + native PostgreSQL replication coordinatorBarman Cloud Plugin (ObjectStore CRD) + VolumeSnapshot supportModern cloud-native teams seeking CNCF governance, clean GitOps CRDs, and VolumeSnapshots
Zalando Postgres OperatorStatefulSet + Spilo container bundling PostgreSQL and HA orchestrationKubernetes Endpoints / ConfigMaps or etcd DCS leader locksWAL-G / WAL-E continuous archiving to S3, GCS, or AzurePlatform teams operating hundreds of standardized multi-tenant PostgreSQL clusters
Crunchy Data PGO (v5)Declarative PostgresCluster CRD managing per-instance single-pod StatefulSetsDistributed consensus backed by Kubernetes DCS leasesIntegrated pgBackRest dedicated repository host + S3/GCS/Azure object storesEnterprises standardized on pgBackRest differential/incremental backup pipelines
Published SLA Response Times

P1 to P3 SLA response times for Kubernetes PostgreSQL clusters

Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

P1 · Critical15 mins

Production database down, primary unreachable, data corruption risk, or active failover event.

P2 · High30 mins

Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.

P3 · Medium60 mins

Non-critical slow query regression, staging issue, backup warning, configuration question, or planned operational request.

Response means an on-call engineer is working the incident, not an automated reply. JusDB's security practices are aligned with ISO 27001 and SOC 2 Type II, and JusDB is pursuing both certifications (see Terms, section 12). Review SLA & legal terms.

04 · Interactive Kubernetes Operator Lifecycle

See how CloudNativePG handles node drains and S3 PITR recovery.

Step through a 3-AZ postgresql.cnpg.io/v1 cluster during steady state, a graceful Kubernetes worker node drain coordinated by PodDisruptionBudgets, and automated Point-In-Time Recovery verification.

cnpg-prod-cluster · K8s Operator State Machine

Select a lifecycle stage to inspect kubectl cnpg status and operator logs

Application and routing

A 3-instance CloudNativePG cluster runs across three worker Availability Zones on dedicated NVMe nodes with synchronous quorum replication and Barman S3 WAL archiving.

Active

    A 3-instance CloudNativePG cluster runs across three worker Availability Zones on dedicated NVMe nodes with synchronous quorum replication and Barman S3 WAL archiving.

    05 · Representative Production Deliverable

    CloudNativePG (postgresql.cnpg.io/v1) Cluster manifest with Barman S3.

    Every Kubernetes engagement delivers GitOps-ready YAML and Helm manifests. Below is an excerpt of a production postgresql.cnpg.io/v1 Cluster manifest with strict zone anti-affinity, dedicated walStorage, pg_stat_statements, and Barman Cloud S3 WAL archiving.

    cnpg-cluster-prod.yaml (postgresql.cnpg.io/v1)

    apiVersion: postgresql.cnpg.io/v1
    kind: Cluster
    metadata:
      name: pg-core
      namespace: prod-db
    spec:
      instances: 3
      imageName: ghcr.io/cloudnative-pg/postgresql:16.6
      primaryUpdateStrategy: unsupervised
    
      postgresql:
        shared_preload_libraries:
          - pg_stat_statements
          - auto_explain
          - pgaudit
        parameters:
          shared_buffers: "8GB"
          effective_cache_size: "24GB"
          work_mem: "32MB"
          maintenance_work_mem: "1GB"
          max_connections: "300"
          autovacuum_max_workers: "6"
          autovacuum_vacuum_cost_limit: "2400"
          checkpoint_completion_target: "0.9"
          random_page_cost: "1.1"
          pg_stat_statements.track: "all"
          pgaudit.log: "ddl,role"
        syncReplicaElectionConstraint:
          enabled: true
          nodeLabelsAntiAffinity:
            - topology.kubernetes.io/zone
    
      resources:
        requests:
          memory: "32Gi"
          cpu: "8"
        limits:
          memory: "32Gi"
          cpu: "8"
    
      affinity:
        enablePodAntiAffinity: true
        topologyKey: topology.kubernetes.io/zone
        podAntiAffinityType: required
        nodeSelector:
          workload-tier: database-nvme
    
      storage:
        storageClass: gp3-encrypted-db
        size: 1000Gi
      walStorage:
        storageClass: io2-low-latency-wal
        size: 120Gi
    
      backup:
        barmanObjectStore:
          destinationPath: s3://acme-prod-pg-backups/pg-core
          s3Credentials:
            inheritFromIAMRole: true
          wal:
            compression: zstd
            maxParallel: 4
        retentionPolicy: "30d"
    
      monitoring:
        enablePodMonitor: true

    06 · Ways to Work Together

    Kubernetes PostgreSQL platform build, cloud repatriation, or managed DBA.

    Partner with senior engineers fluent in both PostgreSQL internals and Kubernetes operators for a fixed-scope platform build, an architecture audit, or retained operations.

    Platform EngineeringRecommended

    K8s PostgreSQL Operator Build

    We design and deploy a production CloudNativePG, Zalando, or Crunchy PGO platform on EKS, GKE, AKS, or bare metal with Pooler CRDs, Barman S3 PITR, and Prometheus monitoring.

    Included in scope

    • GitOps-ready Cluster, Pooler & ObjectStore CRD manifests
    • CSI StorageClass, dedicated node pool & QoS hardening
    • Node-drain & failover GameDay validation with runbooks
    Retained OperationsRetained Operations

    Managed Kubernetes PostgreSQL DBA

    Ongoing operational ownership of your Kubernetes PostgreSQL clusters: operator upgrades, PostgreSQL major/minor rollouts, vacuum tuning, and incident response.

    Included in scope

    • P1 response in 15 mins
    • Continuous PodMonitor alerting on WAL lag, XIDs & PVCs
    • Monthly automated Barman / pgBackRest PITR restore tests
    Diagnostic AssessmentDiagnostic Assessment

    Kubernetes Database Readiness Audit

    Already running PostgreSQL on Kubernetes? We audit your operator CRDs, cgroup memory settings, anti-affinity rules, CSI storage latency, and backup recovery posture.

    Included in scope

    • OOMKill, multi-attach PVC & split-brain risk report
    • Prioritized YAML diffs for Cluster & Pooler CRDs
    • Direct walkthrough with senior K8s PostgreSQL architects

    Procurement and security

    Ready for legal and security review.

    Mutual NDA before any access, least-privilege credentials in your vault, and security controls aligned with ISO 27001 and SOC 2 Type II.
    • Mutual NDA before any access
    • Named individual accounts only
    • Read-only access by default
    • ISO 27001 & SOC 2 Type II: aligned, certification in progress
    • Mutual NDA before any access

      We sign a mutual NDA before viewing schemas, logs, slow-query captures, or cloud topology.

    • Least-privilege, named credentials

      Engineers connect through your bastion, VPN, or SSM using named accounts with read-only permissions by default.

    • Change control & approval gates

      Production DDL, parameter changes, and failovers follow your change-management workflow with rollback steps prepared first.

    • Named leadership & direct escalation

      Engagements are led by named senior database reliability engineers in India with direct Slack, Teams, and PagerDuty channels.

    07 · Frequently Asked Questions

    PostgreSQL on Kubernetes FAQs.

    Technical answers on CloudNativePG vs Zalando vs Crunchy PGO, preventing kubelet OOMKills, local NVMe vs cloud CSI storage, and RDS repatriation.

    Still have a question?

    Ask it on a scoping call. No production access needed.

    Book a 30-min scoping call (opens Google Calendar in a new tab)

    Is running production PostgreSQL on Kubernetes safe for stateful OLTP workloads?

    Yes, when engineered with a mature operator (CloudNativePG, Zalando Postgres Operator, or Crunchy Data PGO), dedicated database worker node pools, pinned QoS resource allocations (requests equal to limits), shared-nothing per-instance PVCs across three Availability Zones, and continuous WAL archiving to S3/GCS/Azure Blob. Most Kubernetes database incidents happen when teams deploy generic StatefulSet Helm charts on burstable shared application nodes without PodDisruptionBudgets or proper CSI storage tuning.

    Should we choose CloudNativePG (CNPG), Zalando Postgres Operator, or Crunchy Data PGO?

    CloudNativePG (CNPG) is our most frequent recommendation for greenfield Kubernetes platforms: it is a CNCF Sandbox/Incubating project built by enterprise PostgreSQL contributors, manages pods and PVCs directly via the Kubernetes API without StatefulSet limitations, and supports native Kubernetes VolumeSnapshots plus Barman Cloud object storage. Zalando Postgres Operator is battle-tested for large platform teams running hundreds of Spilo clusters, while Crunchy Data PGO is ideal for organizations standardized on pgBackRest differential backup repositories.

    How do you prevent kubelet from OOMKilling PostgreSQL pods under heavy query load?

    In Kubernetes, container memory limits enforce a hard cgroup ceiling that includes PostgreSQL shared_buffers, per-backend work_mem allocations, backend process RSS, AND the Linux kernel page cache for that cgroup. We configure PostgreSQL pods with dedicated QoS resource settings (resources.requests equal to resources.limits), cap shared_buffers at 25% of the container limit, enable huge_pages where supported on the node pool, enforce strict work_mem and max_connections limits, and place a PgBouncer Pooler CRD in front of the cluster.

    Should we use cloud network block storage (EBS/PD) or local NVMe SSDs for Kubernetes PostgreSQL?

    Both work well when matched to the right failure model. Cloud CSI block storage (AWS EBS gp3/io2, GCP Persistent Disk / Hyperdisk, Azure Premium SSD v2) persists independently of the worker VM, making node replacement straightforward. Local NVMe SSDs (via TopoLVM or OpenEBS LVM on i3en/i4i or N2-local-SSD nodes) deliver 5x to 10x lower I/O latency and zero per-IOPS cloud surcharges, provided you run at least 3 synchronous quorum replicas across zones and continuous Barman Cloud / pgBackRest backups to object storage.

    How do connection pooling and service discovery work with CloudNativePG?

    CloudNativePG automatically maintains three Kubernetes Services for every cluster: <cluster>-rw pointing exclusively to the current primary pod, <cluster>-ro load-balancing across hot standbys, and <cluster>-r across all instances. To handle high connection concurrency, we deploy the native CNPG Pooler CRD, which spins up horizontal PgBouncer deployments wired with automatic mTLS certificates and seamless failover awareness.

    How do you migrate from Amazon RDS, Aurora, or Cloud SQL into a Kubernetes PostgreSQL operator?

    We use a two-step continuous replication workflow: first, we bootstrap the Kubernetes PostgreSQL cluster (or configure logical replication subscriptions) pulling from your existing RDS, Aurora, or Cloud SQL instance over VPC peering; second, once initial sync completes and replication lag drops to near-zero, we run row-hash parity checks and switch application Kubernetes ExternalName Services or ingress poolers to the local in-cluster Pooler service.

    How are minor and major PostgreSQL version upgrades handled on Kubernetes?

    For minor version upgrades (for example, 16.4 to 16.6), updating the imageName or ImageCatalog reference triggers a rolling update: the operator upgrades each standby pod one at a time, waits for streaming replication to catch up, and then executes a supervised switchover to upgrade the former primary last. For major version upgrades (14/15 to 16/17), we use declarative offline pg_upgrade jobs or blue/green logical replication between two Cluster CRDs.

    What SLA response times apply to managed PostgreSQL on Kubernetes support?

    24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins. Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support. Response means an on-call engineer is working the incident, not an automated reply.

    Building or scaling PostgreSQL on Kubernetes?

    Run stateful PostgreSQL on Kubernetes with confidence.

    Speak directly with a senior Kubernetes PostgreSQL architect to review your CloudNativePG, Zalando, or Crunchy PGO manifests, CSI storage layout, and Barman backup pipeline.

    Direct with a senior engineer · No sales handoff · Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.