PV and PVC: PersistentVolume and PersistentVolumeClaim#
PV - Defines the structure for provisioning storage for use. They have a defined lifecycle, independent of any individual Pod that uses the PV.
A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.
A related concept of Storage Classes - describes the profile of the type of storage. Each storage class contains
- provisioner
- parameter
- reclaimPolicy
Once the name and other parameters of a storage class are defined while creating the objects, it cannot be updated once they are created.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: esdatadir
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumerPVC - Defines the structure for using the provisioned storage.
A PersistentVolumeClaim (PVC) is a request for storage by a user.


![Go: WebService [POST][GET]](/posts/go-webservice-postget/getpost_hu_eee2047d9233208f.png)