To make Kubernetes pod manifest files infrastructure-agnostic and truly portable where storage needs are concerned, two concepts were introduced: PersistentVolume and PersistentVolumeClaim. They add a layer of abstraction that shifts the responsibility of provisioning and maintaining infrastructure-specific hardware details to the cluster admins. Cluster admins create PersistentVolumes based on the hardware they have and know, register them with the Kubernetes API, and Kubernetes takes care of the allocation of storage for pods’ containers based on the PersistentVolumeClaim users require. When an automated volume provisioner is installed in the cluster, PersistentVolumes can be dynamically provisioned based on the PersistentVolumeClaim to further reduce the amount of hardware administrative work.

There are three access modes for persistent volumes: ReadWriteOnce (RWO), ReadWriteMany (RWX) and ReadOnlyMany (ROX). These modes apply to Kubernetes nodes, not individual pods. If a volume is mounted to a node in RWO mode, it can be used by all the pods running on that node.