Skip to content
Search

Kubernetes:PersistentVolume

lastmod 2026-02-05created 2022-07-205 edits

Managing storage is a distinct problem from managing compute instances. The PersistentVolume subsystem provides users and administrators with an API that abstracts the details of how storage is provided from how it is consumed. To do this, two new API resources are introduced: PersistentVolume and PersistentVolumeClaim.

A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using storage classes. A PV is a cluster resource just as a node is a cluster resource. PVs are volume plugins like Volumes, but they have a lifecycle independent of any individual pod that uses the PV. This API object captures the details of the storage implementation, such as NFS, iSCSI, or a cloud-provider-specific storage system.

A PersistentVolumeClaim (PVC) is a request for storage by a user. It is similar to a pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and memory). Claims can request a specific size and access modes (e.g. they can be mounted ReadWriteOnce, ReadOnlyMany, or ReadWriteMany; see AccessModes).

While PersistentVolumeClaims let users consume abstracted storage resources, it is common for users to need PersistentVolumes with varying properties, such as performance, for different problems. Cluster administrators need to be able to offer a variety of PersistentVolumes that differ in more ways than size and access modes, without exposing users to the details of how those volumes are implemented. For these needs, there is the StorageClass resource.

Types of persistent volumes

PersistentVolume types are implemented as plugins. Kubernetes currently supports the following plugins.

  • awsElasticBlockStore - AWS Elastic Block Store (EBS)
  • azureDisk - Azure Disk
  • azureFile - Azure File
  • cephfs - CephFS volume
  • csi - Container Storage Interface (CSI)
  • fc - Fibre Channel (FC) storage
  • gcePersistentDisk - GCE Persistent Disk
  • glusterfs - Glusterfs volume
  • hostPath - HostPath volume (for single-node testing only. Does not work in a multi-node cluster. Consider using a local volume instead)
  • iscsi - iSCSI (SCSI over IP) storage
  • local - local storage devices mounted on nodes
  • nfs - Network File System (NFS) storage
  • portworxVolume - Portworx volume
  • rbd - Rados Block Device (RBD) volume
  • vsphereVolume - vSphere VMDK volume

The PersistentVolume types below are deprecated. This means that support is still available but will be removed in a future Kubernetes release.

  • cinder - Cinder (OpenStack block storage) (deprecated in v1.18)
  • flexVolume - FlexVolume (deprecated in v1.23)
  • flocker - Flocker storage (deprecated in v1.22)
  • quobyte - Quobyte volume (deprecated in v1.22)
  • storageos - StorageOS volume (deprecated in v1.22)

Older versions of Kubernetes also supported the following in-tree PersistentVolume types.

  • photonPersistentDisk - Photon controller persistent disk. (not available after v1.15)
  • scaleIO - ScaleIO volume (not available after v1.21)

See also

Favorite site

author Zer0 sitemap