PersistentVolume
Concept documentation for PersistentVolume
-
- Introduction
- Lifecycle of a volume and claim
- Types of Persistent Volumes
- Persistent Volumes
- PersistentVolumeClaims
- Claims As Volumes
- Raw Block Volume Support
- Volume Snapshot and Restore Volume from Snapshot Support
- Volume Cloning
- Volume populators and data sources
- Writing Portable Configuration
- What's next
apiVersion: v1
import "k8s.io/api/core/v1"
PersistentVolume
PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataObjectMeta |
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata |
specPersistentVolumeSpec |
spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes |
statusPersistentVolumeStatus |
status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes |
PersistentVolumeSpec
PersistentVolumeSpec is the specification of a persistent volume.
| Field | Description |
|---|---|
accessModesstring array |
accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes |
awsElasticBlockStoreAWSElasticBlockStoreVolumeSource |
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore |
azureDiskAzureDiskVolumeSource |
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver. |
azureFileAzureFilePersistentVolumeSource |
azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver. |
capacityobject |
capacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity |
cephfsCephFSPersistentVolumeSource |
cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. |
cinderCinderPersistentVolumeSource |
cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md |
claimRefObjectReference |
claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding |
csiCSIPersistentVolumeSource |
csi represents storage that is handled by an external CSI driver. |
fcFCVolumeSource |
fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. |
flexVolumeFlexPersistentVolumeSource |
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. |
flockerFlockerVolumeSource |
flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. |
gcePersistentDiskGCEPersistentDiskVolumeSource |
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk |
glusterfsGlusterfsPersistentVolumeSource |
glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md |
hostPathHostPathVolumeSource |
hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath |
iscsiISCSIPersistentVolumeSource |
iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. |
localLocalVolumeSource |
local represents directly-attached storage with node affinity |
mountOptionsstring array |
mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options |
nfsNFSVolumeSource |
nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs |
nodeAffinityVolumeNodeAffinity |
nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. This field is mutable if MutablePVNodeAffinity feature gate is enabled. |
persistentVolumeReclaimPolicystring |
persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming Possible enum values: - `"Delete"` means the volume will be deleted from Kubernetes on release from its claim. The volume plugin must support Deletion. - `"Recycle"` means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim. The volume plugin must support Recycling. - `"Retain"` means the volume will be left in its current phase (Released) for manual reclamation by the administrator. The default policy is Retain. |
photonPersistentDiskPhotonPersistentDiskVolumeSource |
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. |
portworxVolumePortworxVolumeSource |
portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver. |
quobyteQuobyteVolumeSource |
quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. |
rbdRBDPersistentVolumeSource |
rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md |
scaleIOScaleIOPersistentVolumeSource |
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. |
storageClassNamestring |
storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. |
storageosStorageOSPersistentVolumeSource |
storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md |
volumeAttributesClassNamestring |
Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. |
volumeModestring |
volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. Possible enum values: - `"Block"` means the volume will not be formatted with a filesystem and will remain a raw block device. - `"Filesystem"` means the volume will be or is formatted with a filesystem. |
vsphereVolumeVsphereVirtualDiskVolumeSource |
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver. |
PersistentVolumeStatus
PersistentVolumeStatus is the current status of a persistent volume.
| Field | Description |
|---|---|
lastPhaseTransitionTimeTime |
lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. |
messagestring |
message is a human-readable message indicating details about why the volume is in this state. |
phasestring |
phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase Possible enum values: - `"Available"` used for PersistentVolumes that are not yet bound Available volumes are held by the binder and matched to PersistentVolumeClaims - `"Bound"` used for PersistentVolumes that are bound - `"Failed"` used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim - `"Pending"` used for PersistentVolumes that are not available - `"Released"` used for PersistentVolumes where the bound PersistentVolumeClaim was deleted released volumes must be recycled before becoming available again this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource |
reasonstring |
reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. |
PersistentVolumeList
PersistentVolumeList is a list of PersistentVolume items.
| Field | Description |
|---|---|
apiVersionstring |
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
items *PersistentVolume array |
items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes |
kindstring |
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadataListMeta |
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
AWSElasticBlockStoreVolumeSource
Represents a Persistent Disk resource in AWS.
An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore |
partitioninteger |
partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). |
readOnlyboolean |
readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore |
volumeID *string |
volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore |
AzureDiskVolumeSource
AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
| Field | Description |
|---|---|
cachingModestring |
cachingMode is the Host Caching mode: None, Read Only, Read Write. Possible enum values: - `"None"` - `"ReadOnly"` - `"ReadWrite"` |
diskName *string |
diskName is the Name of the data disk in the blob storage |
diskURI *string |
diskURI is the URI of data disk in the blob storage |
fsTypestring |
fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. |
kindstring |
kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared Possible enum values: - `"Dedicated"` - `"Managed"` - `"Shared"` |
readOnlyboolean |
readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
AzureFilePersistentVolumeSource
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
| Field | Description |
|---|---|
readOnlyboolean |
readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
secretName *string |
secretName is the name of secret that contains Azure Storage Account Name and Key |
secretNamespacestring |
secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod |
shareName *string |
shareName is the azure Share Name |
CSIPersistentVolumeSource
Represents storage that is managed by an external CSI volume driver
| Field | Description |
|---|---|
controllerExpandSecretRefSecretReference |
controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. |
controllerPublishSecretRefSecretReference |
controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. |
driver *string |
driver is the name of the driver to use for this volume. Required. |
fsTypestring |
fsType to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". |
nodeExpandSecretRefSecretReference |
nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed. |
nodePublishSecretRefSecretReference |
nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. |
nodeStageSecretRefSecretReference |
nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. |
readOnlyboolean |
readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). |
volumeAttributesobject |
volumeAttributes of the volume to publish. |
volumeHandle *string |
volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. |
CephFSPersistentVolumeSource
Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
monitors *string array |
monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it |
pathstring |
path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / |
readOnlyboolean |
readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it |
secretFilestring |
secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it |
secretRefSecretReference |
secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it |
userstring |
user is Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it |
CinderPersistentVolumeSource
Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
fsTypestring |
fsType Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md |
readOnlyboolean |
readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md |
secretRefSecretReference |
secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack. |
volumeID *string |
volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md |
FCVolumeSource
Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. |
luninteger |
lun is Optional: FC target lun number |
readOnlyboolean |
readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
targetWWNsstring array |
targetWWNs is Optional: FC target worldwide names (WWNs) |
wwidsstring array |
wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. |
FlexPersistentVolumeSource
FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
| Field | Description |
|---|---|
driver *string |
driver is the name of the driver to use for this volume. |
fsTypestring |
fsType is the Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. |
optionsobject |
options is Optional: this field holds extra command options if any. |
readOnlyboolean |
readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
secretRefSecretReference |
secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. |
FlockerVolumeSource
Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
datasetNamestring |
datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated |
datasetUUIDstring |
datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset |
GCEPersistentDiskVolumeSource
Represents a Persistent Disk resource in Google Compute Engine.
A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
fsTypestring |
fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk |
partitioninteger |
partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk |
pdName *string |
pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk |
readOnlyboolean |
readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk |
GlusterfsPersistentVolumeSource
Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
endpoints *string |
endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod |
endpointsNamespacestring |
endpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod |
path *string |
path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod |
readOnlyboolean |
readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod |
HostPathVolumeSource
Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
path *string |
path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath |
typestring |
type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Possible enum values: - `""` For backwards compatible, leave it empty if unset - `"BlockDevice"` A block device must exist at the given path - `"CharDevice"` A character device must exist at the given path - `"Directory"` A directory must exist at the given path - `"DirectoryOrCreate"` If nothing exists at the given path, an empty directory will be created there as needed with file mode 0755, having the same group and ownership with Kubelet. - `"File"` A file must exist at the given path - `"FileOrCreate"` If nothing exists at the given path, an empty file will be created there as needed with file mode 0644, having the same group and ownership with Kubelet. - `"Socket"` A UNIX socket must exist at the given path |
ISCSIPersistentVolumeSource
ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
chapAuthDiscoveryboolean |
chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication |
chapAuthSessionboolean |
chapAuthSession defines whether support iSCSI Session CHAP authentication |
fsTypestring |
fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi |
initiatorNamestring |
initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \ |
iqn *string |
iqn is Target iSCSI Qualified Name. |
iscsiInterfacestring |
iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). |
lun *integer |
lun is iSCSI Target Lun number. |
portalsstring array |
portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). |
readOnlyboolean |
readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. |
secretRefSecretReference |
secretRef is the CHAP Secret for iSCSI target and initiator authentication |
targetPortal *string |
targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). |
LocalVolumeSource
Local represents directly-attached storage with node affinity
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a filesystem if unspecified. |
path *string |
path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). |
NFSVolumeSource
Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
path *string |
path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs |
readOnlyboolean |
readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs |
server *string |
server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs |
PhotonPersistentDiskVolumeSource
Represents a Photon Controller persistent disk resource.
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. |
pdID *string |
pdID is the ID that identifies Photon Controller persistent disk |
PortworxVolumeSource
PortworxVolumeSource represents a Portworx volume resource.
| Field | Description |
|---|---|
fsTypestring |
fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. |
readOnlyboolean |
readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
volumeID *string |
volumeID uniquely identifies a Portworx volume |
QuobyteVolumeSource
Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.
| Field | Description |
|---|---|
groupstring |
group to map volume access to Default is no group |
readOnlyboolean |
readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. |
registry *string |
registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes |
tenantstring |
tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin |
userstring |
user to map volume access to Defaults to serivceaccount user |
volume *string |
volume is a string that references an already created Quobyte volume by name. |
RBDPersistentVolumeSource
Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd |
image *string |
image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
keyringstring |
keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
monitors *string array |
monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
poolstring |
pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
readOnlyboolean |
readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
secretRefSecretReference |
secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
userstring |
user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it |
ScaleIOPersistentVolumeSource
ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs" |
gateway *string |
gateway is the host address of the ScaleIO API Gateway. |
protectionDomainstring |
protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. |
readOnlyboolean |
readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
secretRef *SecretReference |
secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. |
sslEnabledboolean |
sslEnabled is the flag to enable/disable SSL communication with Gateway, default false |
storageModestring |
storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. |
storagePoolstring |
storagePool is the ScaleIO Storage Pool associated with the protection domain. |
system *string |
system is the name of the storage system as configured in ScaleIO. |
volumeNamestring |
volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. |
SecretReference
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
| Field | Description |
|---|---|
namestring |
name is unique within a namespace to reference a secret resource. |
namespacestring |
namespace defines the space within which the secret name must be unique. |
StorageOSPersistentVolumeSource
Represents a StorageOS persistent volume resource.
| Field | Description |
|---|---|
fsTypestring |
fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. |
readOnlyboolean |
readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. |
secretRefObjectReference |
secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. |
volumeNamestring |
volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. |
volumeNamespacestring |
volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. |
VolumeNodeAffinity
VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
| Field | Description |
|---|---|
requiredNodeSelector |
required specifies hard node constraints that must be met. |
VsphereVirtualDiskVolumeSource
Represents a vSphere volume resource.
| Field | Description |
|---|---|
fsTypestring |
fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. |
storagePolicyIDstring |
storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. |
storagePolicyNamestring |
storagePolicyName is the storage Policy Based Management (SPBM) profile name. |
volumePath *string |
volumePath is the path that identifies vSphere volume vmdk |
© 2026 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
Copyright © 2026 The Linux Foundation ®. All rights reserved.
https://kubernetes.io/docs/reference/kubernetes-api/core/persistent-volume-v1/