Skip to main content

PersistentVolume [v1]

Description
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
Type
`object`

Specification​

PropertyTypeDescription
apiVersionstringAPIVersion 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
kindstringKind 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
metadataObjectMetaStandard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specobjectPersistentVolumeSpec is the specification of a persistent volume.
statusobjectPersistentVolumeStatus is the current status of a persistent volume.

.spec​

Description
PersistentVolumeSpec is the specification of a persistent volume.
Type
`object`
PropertyTypeDescription
accessModesarray (string)accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
awsElasticBlockStoreobjectRepresents 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.
azureDiskobjectAzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
azureFileobjectAzureFile represents an Azure File Service mount on the host and bind mount to the pod.
capacityobject (Quantity)capacity is the description of the persistent volume’s resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
cephfsobjectRepresents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
cinderobjectRepresents 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.
claimRefobjectObjectReference contains enough information to let you inspect or modify the referred object.
csiobjectRepresents storage that is managed by an external CSI volume driver
fcobjectRepresents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
flexVolumeobjectFlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
flockerobjectRepresents 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.
gcePersistentDiskobjectRepresents 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.
glusterfsobjectRepresents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
hostPathobjectRepresents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
iscsiobjectISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
localobjectLocal represents directly-attached storage with node affinity
mountOptionsarray (string)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
nfsobjectRepresents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.
nodeAffinityobjectVolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
persistentVolumeReclaimPolicystringpersistentVolumeReclaimPolicy 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.
photonPersistentDiskobjectRepresents a Photon Controller persistent disk resource.
portworxVolumeobjectPortworxVolumeSource represents a Portworx volume resource.
quobyteobjectRepresents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.
rbdobjectRepresents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
scaleIOobjectScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
storageClassNamestringstorageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.
storageosobjectRepresents a StorageOS persistent volume resource.
volumeAttributesClassNamestringName 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.
volumeModestringvolumeMode 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.
vsphereVolumeobjectRepresents a vSphere volume resource.

.spec.awsElasticBlockStore​

Description
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.
Type
`object`
Required
  • volumeID
PropertyTypeDescription
fsTypestringfsType 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
partitionintegerpartition 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).
readOnlybooleanreadOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
volumeIDstringvolumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore

.spec.azureDisk​

Description
AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
Type
`object`
Required
  • diskName
  • diskURI
PropertyTypeDescription
cachingModestringcachingMode is the Host Caching mode: None, Read Only, Read Write.
Possible enum values: - "None" - "ReadOnly" - "ReadWrite"
diskNamestringdiskName is the Name of the data disk in the blob storage
diskURIstringdiskURI is the URI of data disk in the blob storage
fsTypestringfsType 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.
kindstringkind 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"
readOnlybooleanreadOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

.spec.azureFile​

Description
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
Type
`object`
Required
  • secretName
  • shareName
PropertyTypeDescription
readOnlybooleanreadOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
secretNamestringsecretName is the name of secret that contains Azure Storage Account Name and Key
secretNamespacestringsecretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod
shareNamestringshareName is the azure Share Name

.spec.cephfs​

Description
Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
Type
`object`
Required
  • monitors
PropertyTypeDescription
monitorsarray (string)monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
pathstringpath is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
readOnlybooleanreadOnly 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
secretFilestringsecretFile 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
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
userstringuser 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

.spec.cephfs.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.cinder​

Description
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.
Type
`object`
Required
  • volumeID
PropertyTypeDescription
fsTypestringfsType 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
readOnlybooleanreadOnly 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
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
volumeIDstringvolumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md

.spec.cinder.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.claimRef​

Description
ObjectReference contains enough information to let you inspect or modify the referred object.
Type
`object`
PropertyTypeDescription
apiVersionstringAPI version of the referent.
fieldPathstringIf referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
kindstringKind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
namestringName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
namespacestringNamespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
resourceVersionstringSpecific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
uidstringUID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

.spec.csi​

Description
Represents storage that is managed by an external CSI volume driver
Type
`object`
Required
  • driver
  • volumeHandle
PropertyTypeDescription
controllerExpandSecretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
controllerPublishSecretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
driverstringdriver is the name of the driver to use for this volume. Required.
fsTypestringfsType to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs".
nodeExpandSecretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
nodePublishSecretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
nodeStageSecretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
readOnlybooleanreadOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).
volumeAttributesobject (string)volumeAttributes of the volume to publish.
volumeHandlestringvolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.

.spec.csi.controllerExpandSecretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.csi.controllerPublishSecretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.csi.nodeExpandSecretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.csi.nodePublishSecretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.csi.nodeStageSecretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.fc​

Description
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.
Type
`object`
PropertyTypeDescription
fsTypestringfsType 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.
lunintegerlun is Optional: FC target lun number
readOnlybooleanreadOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
targetWWNsarray (string)targetWWNs is Optional: FC target worldwide names (WWNs)
wwidsarray (string)wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.

.spec.flexVolume​

Description
FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
Type
`object`
Required
  • driver
PropertyTypeDescription
driverstringdriver is the name of the driver to use for this volume.
fsTypestringfsType 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 (string)options is Optional: this field holds extra command options if any.
readOnlybooleanreadOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace

.spec.flexVolume.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.flocker​

Description
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.
Type
`object`
PropertyTypeDescription
datasetNamestringdatasetName is Name of the dataset stored as metadata → name on the dataset for Flocker should be considered as deprecated
datasetUUIDstringdatasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset

.spec.gcePersistentDisk​

Description
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.
Type
`object`
Required
  • pdName
PropertyTypeDescription
fsTypestringfsType 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
partitionintegerpartition 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
pdNamestringpdName 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
readOnlybooleanreadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk

.spec.glusterfs​

Description
Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.
Type
`object`
Required
  • endpoints
  • path
PropertyTypeDescription
endpointsstringendpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
endpointsNamespacestringendpointsNamespace 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
pathstringpath is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
readOnlybooleanreadOnly 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

.spec.hostPath​

Description
Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.
Type
`object`
Required
  • path
PropertyTypeDescription
pathstringpath 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
typestringtype 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

.spec.iscsi​

Description
ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
Type
`object`
Required
  • targetPortal
  • iqn
  • lun
PropertyTypeDescription
chapAuthDiscoverybooleanchapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
chapAuthSessionbooleanchapAuthSession defines whether support iSCSI Session CHAP authentication
fsTypestringfsType 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
initiatorNamestringinitiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
iqnstringiqn is Target iSCSI Qualified Name.
iscsiInterfacestringiscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
lunintegerlun is iSCSI Target Lun number.
portalsarray (string)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).
readOnlybooleanreadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
targetPortalstringtargetPortal 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).

.spec.iscsi.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.local​

Description
Local represents directly-attached storage with node affinity
Type
`object`
Required
  • path
PropertyTypeDescription
fsTypestringfsType 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.
pathstringpath of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).

.spec.nfs​

Description
Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.
Type
`object`
Required
  • server
  • path
PropertyTypeDescription
pathstringpath that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
readOnlybooleanreadOnly 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
serverstringserver is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs

.spec.nodeAffinity​

Description
VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
Type
`object`
PropertyTypeDescription
requiredobjectA node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.

.spec.nodeAffinity.required​

Description
A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.
Type
`object`
Required
  • nodeSelectorTerms
PropertyTypeDescription
nodeSelectorTermsarrayRequired. A list of node selector terms. The terms are ORed.
nodeSelectorTerms[]objectA null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.

.spec.nodeAffinity.required.nodeSelectorTerms​

Description
Required. A list of node selector terms. The terms are ORed.
Type
`array`

.spec.nodeAffinity.required.nodeSelectorTerms[]​

Description
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
Type
`object`
PropertyTypeDescription
matchExpressionsarrayA list of node selector requirements by node’s labels.
matchExpressions[]objectA node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
matchFieldsarrayA list of node selector requirements by node’s fields.
matchFields[]objectA node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

.spec.nodeAffinity.required.nodeSelectorTerms[].matchExpressions​

Description
A list of node selector requirements by node’s labels.
Type
`array`

.spec.nodeAffinity.required.nodeSelectorTerms[].matchExpressions[]​

Description
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Type
`object`
Required
  • key
  • operator
PropertyTypeDescription
keystringThe label key that the selector applies to.
operatorstringRepresents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
Possible enum values: - "DoesNotExist" - "Exists" - "Gt" - "In" - "Lt" - "NotIn"
valuesarray (string)An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

.spec.nodeAffinity.required.nodeSelectorTerms[].matchFields​

Description
A list of node selector requirements by node’s fields.
Type
`array`

.spec.nodeAffinity.required.nodeSelectorTerms[].matchFields[]​

Description
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Type
`object`
Required
  • key
  • operator
PropertyTypeDescription
keystringThe label key that the selector applies to.
operatorstringRepresents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
Possible enum values: - "DoesNotExist" - "Exists" - "Gt" - "In" - "Lt" - "NotIn"
valuesarray (string)An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.

.spec.photonPersistentDisk​

Description
Represents a Photon Controller persistent disk resource.
Type
`object`
Required
  • pdID
PropertyTypeDescription
fsTypestringfsType 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.
pdIDstringpdID is the ID that identifies Photon Controller persistent disk

.spec.portworxVolume​

Description
PortworxVolumeSource represents a Portworx volume resource.
Type
`object`
Required
  • volumeID
PropertyTypeDescription
fsTypestringfSType 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.
readOnlybooleanreadOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
volumeIDstringvolumeID uniquely identifies a Portworx volume

.spec.quobyte​

Description
Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.
Type
`object`
Required
  • registry
  • volume
PropertyTypeDescription
groupstringgroup to map volume access to Default is no group
readOnlybooleanreadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
registrystringregistry 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
tenantstringtenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
userstringuser to map volume access to Defaults to serivceaccount user
volumestringvolume is a string that references an already created Quobyte volume by name.

.spec.rbd​

Description
Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.
Type
`object`
Required
  • monitors
  • image
PropertyTypeDescription
fsTypestringfsType 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
imagestringimage is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
keyringstringkeyring 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
monitorsarray (string)monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
poolstringpool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
readOnlybooleanreadOnly 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
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
userstringuser is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it

.spec.rbd.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.scaleIO​

Description
ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume
Type
`object`
Required
  • gateway
  • system
  • secretRef
PropertyTypeDescription
fsTypestringfsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs"
gatewaystringgateway is the host address of the ScaleIO API Gateway.
protectionDomainstringprotectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
readOnlybooleanreadOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
secretRefobjectSecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
sslEnabledbooleansslEnabled is the flag to enable/disable SSL communication with Gateway, default false
storageModestringstorageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
storagePoolstringstoragePool is the ScaleIO Storage Pool associated with the protection domain.
systemstringsystem is the name of the storage system as configured in ScaleIO.
volumeNamestringvolumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.

.spec.scaleIO.secretRef​

Description
SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace
Type
`object`
PropertyTypeDescription
namestringname is unique within a namespace to reference a secret resource.
namespacestringnamespace defines the space within which the secret name must be unique.

.spec.storageos​

Description
Represents a StorageOS persistent volume resource.
Type
`object`
PropertyTypeDescription
fsTypestringfsType 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.
readOnlybooleanreadOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
secretRefobjectObjectReference contains enough information to let you inspect or modify the referred object.
volumeNamestringvolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
volumeNamespacestringvolumeNamespace 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.

.spec.storageos.secretRef​

Description
ObjectReference contains enough information to let you inspect or modify the referred object.
Type
`object`
PropertyTypeDescription
apiVersionstringAPI version of the referent.
fieldPathstringIf referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
kindstringKind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
namestringName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
namespacestringNamespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
resourceVersionstringSpecific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
uidstringUID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

.spec.vsphereVolume​

Description
Represents a vSphere volume resource.
Type
`object`
Required
  • volumePath
PropertyTypeDescription
fsTypestringfsType 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.
storagePolicyIDstringstoragePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
storagePolicyNamestringstoragePolicyName is the storage Policy Based Management (SPBM) profile name.
volumePathstringvolumePath is the path that identifies vSphere volume vmdk

.status​

Description
PersistentVolumeStatus is the current status of a persistent volume.
Type
`object`
PropertyTypeDescription
lastPhaseTransitionTimeTimelastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.
messagestringmessage is a human-readable message indicating details about why the volume is in this state.
phasestringphase 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
reasonstringreason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.

API endpoints​

The following API endpoints are available:

  • /api/v1/persistentvolumes
    • DELETE: delete collection of PersistentVolume
    • GET: list or watch objects of kind PersistentVolume
    • POST: create a PersistentVolume
  • /api/v1/watch/persistentvolumes
    • GET: watch individual changes to a list of PersistentVolume. deprecated: use the 'watch' parameter with a list operation instead.
  • /api/v1/persistentvolumes/{name}
    • DELETE: delete a PersistentVolume
    • GET: read the specified PersistentVolume
    • PATCH: partially update the specified PersistentVolume
    • PUT: replace the specified PersistentVolume
  • /api/v1/watch/persistentvolumes/{name}
    • GET: watch changes to an object of kind PersistentVolume. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.
  • /api/v1/persistentvolumes/{name}/status
    • GET: read status of the specified PersistentVolume
    • PATCH: partially update status of the specified PersistentVolume
    • PUT: replace status of the specified PersistentVolume

/api/v1/persistentvolumes​

HTTP method
`DELETE`
Description
delete collection of PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

HTTP responses

HTTP codeReponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
`GET`
Description
list or watch objects of kind PersistentVolume

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolumeList schema
401 - UnauthorizedEmpty
HTTP method
`POST`
Description
create a PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Body parameters

ParameterTypeDescription
bodyPersistentVolume schema

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
201 - CreatedPersistentVolume schema
202 - AcceptedPersistentVolume schema
401 - UnauthorizedEmpty

/api/v1/watch/persistentvolumes​

HTTP method
`GET`
Description
watch individual changes to a list of PersistentVolume. deprecated: use the 'watch' parameter with a list operation instead.

HTTP responses

HTTP codeReponse body
200 - OKWatchEvent schema
401 - UnauthorizedEmpty

/api/v1/persistentvolumes/{name}​

Global path parameters

ParameterTypeDescription
namestringname of the PersistentVolume
HTTP method
`DELETE`
Description
delete a PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
202 - AcceptedPersistentVolume schema
401 - UnauthorizedEmpty
HTTP method
`GET`
Description
read the specified PersistentVolume

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
401 - UnauthorizedEmpty
HTTP method
`PATCH`
Description
partially update the specified PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
201 - CreatedPersistentVolume schema
401 - UnauthorizedEmpty
HTTP method
`PUT`
Description
replace the specified PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Body parameters

ParameterTypeDescription
bodyPersistentVolume schema

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
201 - CreatedPersistentVolume schema
401 - UnauthorizedEmpty

/api/v1/watch/persistentvolumes/{name}​

Global path parameters

ParameterTypeDescription
namestringname of the PersistentVolume
HTTP method
`GET`
Description
watch changes to an object of kind PersistentVolume. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.

HTTP responses

HTTP codeReponse body
200 - OKWatchEvent schema
401 - UnauthorizedEmpty

/api/v1/persistentvolumes/{name}/status​

Global path parameters

ParameterTypeDescription
namestringname of the PersistentVolume
HTTP method
`GET`
Description
read status of the specified PersistentVolume

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
401 - UnauthorizedEmpty
HTTP method
`PATCH`
Description
partially update status of the specified PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
201 - CreatedPersistentVolume schema
401 - UnauthorizedEmpty
HTTP method
`PUT`
Description
replace status of the specified PersistentVolume

Query parameters

ParameterTypeDescription
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Body parameters

ParameterTypeDescription
bodyPersistentVolume schema

HTTP responses

HTTP codeReponse body
200 - OKPersistentVolume schema
201 - CreatedPersistentVolume schema
401 - UnauthorizedEmpty