Persistent Volume Properties

Kubernetes persistent volumes (PVs) are a way to manage durable storage in a Kubernetes cluster. Unlike ephemeral storage, which is tied to the life cycle of a pod, PVs offer a stable and reusable storage solution that persists beyond the lifetime of individual pods.

Persistent Volume Properties describes the PV properties:

Table 1. Persistent Volume Properties
Name Description
persistence.enabled Set this to true to enable persistence in the application's Helm chart. The default value is false.
persistance.volumes A map of the volumes.
persistence.volumes.[name] The name of the PV container.
persistence.volumes.[name].accessMode The access mode for the volume. The default value is ReadWriteOnce.
persistence.volumes.[name].storageClass The storage class of the volume.
persistence.volumes.[name].additionalLabels More labels for the volume.
persistence.volumes.[name].annotations Annotations for the volume.
persistence.volumes.[name].storageSize The size of the volume. The default value is 8Gi.
persistence.volumes.[name].volumeName The name of the volume.
persistence.volumes.[name].volumeMode The volume mode.
This is an example of a PV properties configuration:
persistence:
  enabled: true
  volumes:
    pv-volume:
      hostPath: "/tmp/data"
      accessMode: ReadWriteMany
      storageClass: "-"
      #  "helm.sh/resource-policy": keep
      storageSize: 2Gi
      volumeName: "task-pv-volume"