Home > Storage > PowerFlex > White Papers > Dell APEX Block Storage for Azure: PostgreSQL Deployment and Performance on Kubernetes > PostgreSQL StatefulSet YAML file
The following code sample shows the PostgreSQL StatefulSet YAML file:
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres-n
labels:
app: postgres
spec:
replicas: 3
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:latest
args: ["-c", "shared_buffers=2GB", "-c", "effective_cache_size=8GB", "-c", "work_mem=16MB", "-c", "maintenance_work_mem=410MB", "-c", "min_wal_size=2GB", "-c", "max_wal_size=3GB", "-c", "checkpoint_completion_target=0.9", "-c", "wal_buffers=-1", "-c", "listen_addresses=*", "-c", "max_connections=1000", "-c", "random_page_cost=1.1", "-c", "effective_io_concurrency=300", "-c", "max_worker_processes=40", "-c", "max_parallel_workers_per_gather=4", "-c", "max_parallel_workers=40"]
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5432
envFrom:
- configMapRef:
name: postgres-config
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
serviceName: postgres
volumeClaimTemplates:
- metadata:
name: postgres-data
spec:
accessModes: [ "ReadWriteOnce" ]
volumeMode: Filesystem
resources:
requests:
storage: 1400Gi
storageClassName: vxflexos-xfs