Understanding how to mount a PersistentVolume to your Pod claims
We can now try to mount a PersistentVolume
object to a Pod. To do that, we will need to use another object, which is the second object we need to explore in this chapter, called PersistentVolumeClaim
.
Introducing PersistentVolumeClaim
Just like PersistentVolume
or ConfigMap
, PersistentVolumeClaim
is another independent resource kind living within your Kubernetes cluster.
. First, bear in mind that even if both names are almost the same, PersistentVolume
and PersistentVolumeClaim
are two distinct resources that represent two different things.
You can list the PersistentVolumeClaim
resource kind created within your cluster using kubectl
, as follows:
$ kubectl get persistentvolumeclaims
No resources found in default namespace.
The following output is telling me that I don't have any PersistentVolumeClaim
resources created within my cluster. Please note that the pvc
alias works, too:
$ kubectl get pvc
No resources found...