A volume claim template is a StatefulSet specification that requests persistent storage for each Pod replica. Unlike a regular Deployment, a StatefulSet can give every Pod its own volume, allowing stateful containers such as databases and message queues to retain data. section 8.4 section 8.4.2
PostgreSQL StatefulSet
A PostgreSQL StatefulSet can declare a volumeClaimTemplates entry named db-vol, request 20Gi of retained block storage, and mount that claim at /var/lib/postgresql. An init container removes the volume's lost+found directory before PostgreSQL starts.


