liveBook · Manning

Persistent volume claim

As explained in Distributed Machine Learning Patterns

A PersistentVolumeClaim is a Kubernetes resource that requests persistent storage with specified capacity and access requirements.

Distributed training workers run in Kubernetes Pods whose files disappear when the Pods complete. A PersistentVolumeClaim preserves checkpoints and trained models beyond that Pod lifecycle. section 9.2.2

A PersistentVolumeClaim (PVC) requests storage from a PersistentVolume (PV), much as a Pod requests CPU and memory from a node. The claim specifies capacity and access mode, while the PV persists independently of individual Pods. section 9.2.2

Use the claim to connect persistent storage to machine-learning workloads:

  • Request a capacity such as 1 Gi and an access mode such as ReadWriteOnce, ReadOnlyMany, or ReadWriteMany. section 9.2.2
  • Reuse the mounted storage across workflow steps to retain downloaded datasets and pass trained models to selection or serving. section 9.4.1

Distributed training storage

A two-worker TFJob mounts the claim at /trained_model. Workers write checkpoints and the saved model there; later workflow steps mount the same persistent storage for model selection and serving. section 9.4.1

How Distributed Machine Learning Patterns covers it

How deep it goes
Defines capacity, access modes, PV relationships, and mounting, but does not detail storage-backend administration.
Examples
Uses a 1 Gi ReadWriteOnce claim mounted at /trained_model by two-worker training and later workflow steps.
What it assumes
Assumes familiarity with Kubernetes Pods and cluster resources while teaching PVC requests through their analogy with Pod resource requests.
What you can do after
Operate/configure persistent training storage by creating a PVC and mounting it in Kubernetes workloads.
How it connects
Connects PersistentVolumeClaims with PersistentVolumes, Pods, TFJobs, Argo workflows, and KServe model serving.

Also explained in

Compare how 9 books explain persistent volume claim →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.