O'Reilly logo

Kubernetes Cookbook, 2nd Edition by Ke-Jou Carol Hsu, Hui-Chuan Chloe Lee, Hideto Saito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required