Skip to main content

Persistent Volume

A Persistent Volume (PV) in Kubernetes provides an abstraction for storage resources in a cluster. It allows users to decouple the storage backend from the application, facilitating storage management, persistence, and sharing among containers. A PV is provisioned by an administrator or dynamically provisioned using Storage Classes and contains data and storage information such as capacity, access mode, and reclaim policy. For more detailed information, refer to the Kubernetes official documentation.

Terrafrom Mappings:

  • kubernetes_persistent_volume.metadata[0].name
  • kubernetes_persistent_volume_v1.metadata[0].name

Supported Methods​

  • GET: Get a PersistentVolume by name
  • LIST: List all PersistentVolumes
  • SEARCH: Search for a PersistentVolume using the ListOptions JSON format e.g. ("labelSelector": "app=wordpress")

ec2-volume​

Persistent Volumes can be provisioned using AWS EC2 volumes, where the EC2 volumes serve as the underlying storage resources that back the PV in a Kubernetes cluster. This allows Kubernetes applications to utilise Amazon's Elastic Block Store for persistent data storage.

efs-access-point​

AWS EFS Access Points can be used to provide data storage solutions for Kubernetes Persistent Volumes. Through EFS Access Points, Kubernetes clusters can leverage Amazon's Elastic File System, offering scalable file storage that can be mounted concurrently by multiple pods.

StorageClass​

A StorageClass in Kubernetes defines the provisioner, parameters, and reclaim policy that are used when a Persistent Volume is dynamically provisioned. It acts as a blueprint for creating Persistent Volumes, allowing users to influence how storage resources are allocated and managed within the cluster.