All templates
KubernetesKubernetesStatefulSetPostgreSQLPVC

Kubernetes stateful PostgreSQL

PostgreSQL StatefulSet with PVCs, headless service, replication, automated backups, and read/write split.

The prompt

Stateful PostgreSQL workload on Kubernetes. PostgreSQL StatefulSet with three replicas: one primary and two replicas. Each pod has its own PersistentVolumeClaim bound to a PersistentVolume backed by a cloud SSD. A Headless Service provides direct pod addressing for replication. A separate ClusterIP Service load-balances read traffic across replicas. The StorageClass uses delete reclaimPolicy. Streaming replication from primary to replicas. Backups via Velero to S3-compatible object storage on a daily schedule. Show the PgBouncer pool in front and the application read/write split.

What it generates

A diagram showing the StatefulSet pods, PVC bindings, replication topology, connection pooling, and backup destination.

When to use it

For self-managed PostgreSQL on Kubernetes when a managed cloud database isn't an option (cost, compliance, or specific extension requirements).

Generate this diagram in seconds

Copy the prompt above, sign in for free, and paste it into the generator.

Related kubernetes templates