liveBook · Manning

Persistent volume

As explained in Google Anthos in Action

A persistent volume is a Kubernetes resource representing storage provisioned for use by workloads independently of a pod's lifecycle.

A persistent volume represents durable storage for a Kubernetes workload independently of a Pod’s lifecycle. During VM-to-container migration, it provides a destination for application data that cannot simply become part of the container image. Migrate for Anthos (M4A) refactors VM storage into a Kubernetes-supported persistent volume while leaving networking, logging, and other shared functions to Kubernetes. section 15.3.2 section 15.4.3

Figure 15.2 Anthos Migrate: From virtual machines to containers
15-02

The VM-to-container diagram places persistent storage among the deployment artifacts rather than the VM components retained in the container image. section 15.3.2

The generated deployment YAML depends on the migration intent:

  • ImageAndData describes a stateful application with a StatefulSet of Pods, a PersistentVolume for durable storage, and a PersistentVolumeClaim requesting storage characteristics such as size and access mode. section 15.4.3
  • Data includes PersistentVolume and PersistentVolumeClaim resources without the image-deployment components listed for ImageAndData. section 15.4.3

M4A mounts a persistent volume through its Container Storage Interface (CSI) driver and streams data from the source VM filesystem. Review the generated storage configuration before deployment: M4A does not automatically migrate NFS mounts. For an NFS share, manually define the persistent-volume directives and add them to the generated Pod YAML. section 15.3.2 section 15.5

How Google Anthos in Action covers it

How deep it goes
Explains generated volume and claim responsibilities and the migration mount path, but does not detail Kubernetes storage provisioning.
Examples
Uses ImageAndData and Data deployment intents, plus an NFS share requiring manual YAML changes.
What it assumes
Assumes familiarity with VM filesystems, Pods, and Kubernetes YAML; does not teach storage provisioning from scratch.
What you can do after
Operate/configure it by reviewing M4A-generated storage resources and adding persistent-volume directives for NFS mounts.
How it connects
Connects persistent volumes to PersistentVolumeClaims, StatefulSets, Pods, and the Container Storage Interface.

Also explained in

Compare how 7 books explain persistent volume →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.