Kubernetes - PVC / PV
Primitives: PersistentVolumeClaim, PersistentVolume, StorageClass, VolumeSnapshot (requires CSI driver support).
Kubernetes supports two volumeModes of PersistentVolumes: Filesystem (default) and Block.
PVC in "Lost" Status
If you delete a PV, the coresponding PVC status will be changed from Bound to Lost.
If a PVC is in lost state, try to delete this PVC's annoation, it will make the PVC rebind:
"annotations": {
"pv.kubernetes.io/bind-completed": "yes"
},
PV in "Released" Status
If PV is stuck in Released Status, remove the .spec.claimRef => PV should change to "Available", then it may be "Bound"
Relationships
StorageClass- (.provisioner) -> CSI driverPVC- (.spec.storageClassName) ->StorageClassPOD- (.spec.values[].persistentVolumeClaim) ->PVC
kind: StorageClass
provisioner: csi-driver.example.com
Pod to PVC:
kind: Pod
spec:
volumes:
- name: foo
persistentVolumeClaim:
claimName: my-request-for-storage
Recommended ReadingSponsored
Kubernetes
- Kubernetes - Overview
- Kubernetes - Static Pods
- Kubernetes - APIs
- Kubernetes - Distributions
- Kubernetes - Auth
- Kubernetes - Operators
- Kubernetes - Registries
- Kubernetes - Container Runtimes (CRI)
- Kubernetes - Storage (CSI)
- Kubernetes - Networking (CNI)
- Kubernetes - Bootstrapping
- Kubernetes - Testing
- Kubernetes - Source Code
- Kubernetes - kubeconfig
- Kubernetes - Webhooks
- Kubernetes - OS
- Kubernetes - DNS
- Kubernetes - Versus
- Kubernetes - Upgrade
- Kubernetes - Troubleshooting
- Kubernetes - Logging
- Kubernetes - AddOns
- Kubernetes - Pod Sandbox
- Kubernetes - cgroup
Kubernetes - Objects
Kubernetes - Components
Extending Kubernetes
Cloud Native Ecosystem
Kubernetes Troubleshooting

