PersistentVolumes

An illustration of PersistentVolume is shown in the following graph. First, the administrator provisions the specification of a PersistentVolume. Then the consumer requests for storage with PersistentVolumeClaim. Finally, the Pod mounts the volume with the reference of PersistentVolumeClaim:

PersistentVolumeClaims is an abstract layer to decouple volumes for a Pod and physical volume resource

Here is an example using NFS. The administrator needs to provision and allocate PersistentVolume first:

# example of PV with NFS$ cat 2-6-7_pv.yaml  apiVersion: "v1"  kind: "PersistentVolume"  metadata:    name: "pvnfs01"  spec:    capacity:

Get Kubernetes Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.