Is it necessary to create persitent volume object and then claim it using persistent volume claim or we can directly use storage class

7/2/2020

As in documentation of Kubernetes, it says if we use Storage class then it creates dynamic PV(Persistent Volume) object according to our need and using PVC(persistent volume claim) we can claim that now my question is if I create Storage class object then we still need to create PV object or we can use PVC to claim storage directly from Storage Class Object.

I mean what sense of creating PV objects than?

Object means creating a YAML file of it.

-- xoxocoder
kubernetes
persistent-volume-claims
persistent-volumes

1 Answer

7/2/2020

Creating of PV is needed if you don't have a StorageClass. If there is a StorageClass then PV is not needed. For a StorageClass to be able to perform dynamic provision a driver which implements CSI spec need to installed in the kubernetes cluster which is not always available or possible or supported.

-- Arghya Sadhu
Source: StackOverflow