A Persistent Volume Claim requests for storage that meets the configuration specified. Kubernetes will select the appropriate Persistent Volume for us.

Here’s a sample PVC file.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: name-of-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi

What is happening here?

We created a PVC called name-of-pvc, which has a ReadWriteOnce access mode and it requests for a storage resource with 2Gi in space.

Resources