A PersistentVolumeClaim (PVC) requests managed storage for a Kubernetes cluster. Kubernetes provisions the volume, attaches it to a node, and makes it available to Pods. section 8.4 section 8.4.1
A PVC manifest specifies the storage requirements and lifecycle:
- accessModes controls how Pods use the volume; ReadWriteOnce allows attachment to one Pod, while other modes may depend on the cloud provider. section 8.4.1
- resources.requests.storage sets the requested capacity, such as 10Gi. section 8.4.1
- storageClassName selects the provider-backed storage behavior, including whether the volume is deleted or retained with the claim. section 8.4.1
- A Deployment attaches the claim through volumes and volumeMounts, making the storage available at a container path. section 8.4.1
Attach a claim to nginx
Create a PVC requesting 10Gi with ReadWriteOnce, then reference it from an nginx Deployment. Apply both manifests with kubectl apply -f deploy-pvc/ and inspect the claim with kubectl describe pvc first-pvc. section 8.4.1
Listing 8.14 PersistentVolumeClaim resource
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: first-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: linode-block-storage-retain
Shows a complete PersistentVolumeClaim manifest with access mode, requested capacity, and retained block-storage class. section 8.4.1
Listing 8.15 Deployment resource with a PVC
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 1
...
template:
...
spec:
...
containers:
- name: nginx
...
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: first-pv-storage
volumes:
- name: first-pv-storage
persistentVolumeClaim:
claimName: first-pvc
Shows how a Deployment references the claim and mounts its volume at /usr/share/nginx/html. section 8.4.1








