Skip to content
Docs Try Aspire

PersistentVolumeSpecV1 Properties

Class Properties 11 members
Represents the specification for a Kubernetes Persistent Volume. Defines the details of storage and access configurations for a PersistentVolume resource.
AccessModes Section titled AccessModes List<string>
Represents the access modes for a Persistent Volume in a Kubernetes cluster. AccessModes define the ways in which the volume can be mounted and utilized: - ReadWriteOnce: The volume can be mounted as read-write by a single node. - ReadOnlyMany: The volume can be mounted read-only by many nodes. - ReadWriteMany: The volume can be mounted as read-write by many nodes.
public List<string> AccessModes { get; }
Capacity Section titled Capacity Dictionary<string, string>
Represents the storage capacity of the persistent volume. The keys in the dictionary represent capacity types (e.g., "storage"), and the values define the corresponding quantity for the capacity type.
public Dictionary<string, string> Capacity { get; set; }
Gets or sets the reference to a claim within the Kubernetes cluster that is bound to the PersistentVolume. This property links the PersistentVolume to a specific PersistentVolumeClaim (PVC) via an object reference, allowing resources to be dynamically or statically provisioned as required.
public ObjectReferenceV1 ClaimRef { get; set; }
Gets or sets the configuration for a HostPath volume in a Kubernetes PersistentVolume. This property specifies the details of a HostPath volume source, allowing a directory from the host node file system to be mounted into a pod's container.
public HostPathVolumeSourceV1 HostPath { get; set; }
Gets or sets the configuration for a local volume source.
public LocalVolumeSourceV1 Local { get; set; }
This property specifies the configuration for a local PersistentVolume in Kubernetes, represented by the LocalVolumeSourceV1 type. Local volumes are backed by a specific file or directory on the node where the volume is created.
MountOptions Section titled MountOptions List<string>
Specifies a list of mount options for a persistent volume. Mount options are passed to the mount binary (e.g., NFS, Ceph) for configuring the volume at mount time. These options allow customization of mount behavior based on the filesystem or volume type.
public List<string> MountOptions { get; }
Specifies constraints that limit which nodes a persistent volume can be accessed from.
public VolumeNodeAffinityV1 NodeAffinity { get; set; }
The NodeAffinity property defines the rules and requirements for associating a PersistentVolume with specific nodes in the Kubernetes cluster. It describes the node selection criteria, which help ensure proper placement of the volume based on node attributes and conditions.
PersistentVolumeReclaimPolicy Section titled PersistentVolumeReclaimPolicy string
Describes the reclaim policy of a PersistentVolume in Kubernetes. The reclaim policy determines how a PersistentVolume should be treated when it is released from its associated PersistentVolumeClaim. Typical values include: - "Retain": Retains the volume for manual recovery. - "Recycle": Cleans the volume by removing its contents for reuse. - "Delete": Deletes the volume from storage.
public string PersistentVolumeReclaimPolicy { get; set; }
StorageClassName Section titled StorageClassName string
Specifies the name of the StorageClass associated with this persistent volume. The StorageClass provides dynamic provisioning parameters and policies for the storage resource. If no StorageClass is defined, the default StorageClass for the cluster will be applied if available.
public string StorageClassName { get; set; }
VolumeAttributesClassName Section titled VolumeAttributesClassName string
Specifies the class name associated with volume attributes in a Kubernetes PersistentVolume specification. This property is typically used to indicate a custom class of attributes assigned to the persistent volume, enabling more granular configurations or specific behaviors for the volume.
public string VolumeAttributesClassName { get; set; }
VolumeMode Section titled VolumeMode string
Specifies the volume mode of the persistent volume.
public string VolumeMode { get; set; }
Defines the way the volume is mounted. Typical values include "Filesystem" or "Block". This property is required to determine how the volume will be used and accessed.