Persistent volume claims
Persistent volume claims (PVCs) are namespace-scoped storage requests that specify capacity, access modes, and storage class requirements. Each claim contains a spec field defining the storage request parameters and a status field tracking the binding state and current conditions of the claim.
Example
PersistentVolumeClaim object definitionkind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: myclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: gold
status:
# ...
-
apiVersion: Specifies the name of the PVC. -
spec.accessModes: Specifies the access mode, defining the read/write and mount permissions. -
requests.storage: Specifies the amount of storage available to the PVC. -
storageClassName: Specifies the name of theStorageClassrequired by the claim.