From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Configuring PersistentVolume (PV) storage

Configuring PersistentVolume (PV) storage - Kubernetes Tutorial

From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Configuring PersistentVolume (PV) storage

- So in a previous lesson, we have talked about Pod volumes. Pod volumes are nice, but there's one big disadvantage, and that is that the information about the specific storage that you are using is within the Pod. And in a cloud-native environment, you don't want to have any specific reference, you want it to be decoupled. And that is why PersistentVolumes can be useful. PersistentVolumes, PV as they are also known, are API resources that represent specific storage. So it's a separate API resource, which means that you don't have the storage information in your Pods. You can create them manually, and also, automatically using StorageClass and storage provisioners. That's pretty powerful, because that means that the Pod requests storage through a PVC, and the storage will automatically be allocated. To create a PersistentVolume, you need to set a couple of properties. First, there is storageClassName. You use it as a selector label to allow PVCs to bind, even if there's no…

Contents