Persistent Volume Claim for StatefulSet

Zhimin Wen
2 min readSep 22, 2018

Sometimes, we need the configuration to persist so that when the pod restarts the same configuration can be applied. We typically request a Persistent Volume Claim (PVC) through the storage provider to create the Persistent Volume (PV), and we can mount it to the pod container.

Use PV in Deployment

  1. Apply the following yaml file to create a PVC
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-persistent-cfg
spec:
accessModes:
- ReadWriteOnce
resources:
requests…

--

--