This topic describes the binding relationships between PVCs and PVs.
Binding relationship
PVCs and PVs are in one-to-one correspondence. One PV can be bound only to one PVC. When you configure storage for an application, you must configure a PVC. Kubernetes selects a PV that meets the PVC requirement through the best match and binds the PV to the PVC.
VolumeMode specifies whether the volume is a filesystem or a block. A PV can be bound to a PVC only when their volume modes are the same. For more information, see the following table.
PV volumeMode | PVC volumeMode | Bind or not |
- | - | Y |
- | Block | N |
- | Filesystem | Y |
Block | - | N |
Block | Block | Y |
Block | Filesystem | N |
Filesystem | Filesystem | Y |
Filesystem | Block | N |
Filesystem | - | Y |
该文章对您有帮助吗?