1.85. io.k8s.api.core.v1.PersistentVolumeSpec schema
- 描述
 - PersistentVolumeSpec 是持久性卷的规格。
 - 类型
 - 
							
对象 
模式
| 属性 | 类型 | 描述 | 
|---|---|---|
|   
								  |   
								  |   accessModes 包含可以挂载卷的所有方法。更多信息: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes  | 
|   
								  |   
								  |   awsElasticBlockStore 代表一个 AWS Disk 资源,附加到 kubelet 的主机机器,然后公开给 pod。弃用:AWSElasticBlockStore 已被弃用。in-tree awsElasticBlockStore 类型的所有操作都会重定向到 ebs.csi.aws.com CSI 驱动程序。更多信息: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore  | 
|   
								  |   
								  |   azureDisk 代表主机上的 Azure Data Disk 挂载,并绑定到 pod。已弃用:AzureDisk 已被弃用。in-tree azureDisk 类型的所有操作都会重定向到 disk.csi.azure.com CSI 驱动程序。  | 
|   
								  |   
								  |   azureFile 代表主机上的 Azure File Service 挂载,并绑定到 pod。已弃用:AzureFile 已被弃用。in-tree azureFile 类型的所有操作都会重定向到 file.csi.azure.com CSI 驱动程序。  | 
|   
								  |   capacity 是持久性卷资源和容量的描述。更多信息: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity  | |
|   
								  |   
								  |   CephFS 代表共享 pod 生命周期的主机上的 Ceph FS 挂载。弃用:CephFS 已被弃用,in-tree cephfs 类型不再被支持。  | 
|   
								  |   
								  |   Cinder 代表附加并挂载到 kubelet 主机机器上的 cinder 卷。已弃用:Cinder 已被弃用。in-tree cinder 类型的所有操作都会重定向到 cinder.csi.openstack.org CSI 驱动程序。更多信息: https://examples.k8s.io/mysql-cinder-pd/README.md  | 
|   
								  |   claimRef 是 PersistentVolume 和 PersistentVolumeClaim 之间的双向绑定的一部分。当 bound. claim.VolumeName 是 PV 和 PVC 之间的权威绑定时,预期为非 nil。更多信息: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding  | |
|   
								  |   
								  |   CSI 代表由外部 CSI 驱动程序处理的存储。  | 
|   
								  |   
								  |   FC 代表附加到 kubelet 主机机器的光纤通道资源,然后公开给 pod。  | 
|   
								  |   
								  |   FlexVolume 代表使用基于 exec 的插件置备的/附加的通用卷资源。已弃用:FlexVolume 已被弃用。考虑使用 CSIDriver 替代。  | 
|   
								  |   
								  |   flocker 代表附加到 kubelet 主机机器的 Flocker 卷,并公开给 pod 以供使用。这取决于正在运行的 Flocker 控制服务。已弃用:Flocker 已弃用,in-tree flocker 类型不再被支持。  | 
|   
								  |   
								  |   gcePersistentDisk 代表一个 GCE Disk 资源,该资源附加到 kubelet 的主机机器,然后公开给 pod。由管理员调配。已弃用: GCEPersistentDisk 已被弃用。树内 gcePersistentDisk 类型的所有操作都会重定向到 pd.csi.storage.gke.io CSI 驱动程序。更多信息: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk  | 
|   
								  |   
								  |   GlusterFS 代表附加到主机的 Glusterfs 卷,并公开给 pod。由管理员调配。已弃用: Glusterfs 已被弃用,in-tree glusterfs 类型不再被支持。更多信息: https://examples.k8s.io/volumes/glusterfs/README.md  | 
|   
								  |   
								  |   hostpath 代表主机上的一个目录。由开发人员或测试者调配。这仅适用于单节点开发和测试。主机存储不以任何方式支持,在多节点集群中的 WILL NOT WORK 不被支持。更多信息: https://kubernetes.io/docs/concepts/storage/volumes#hostpath  | 
|   
								  |   
								  |   iSCSI 代表附加到 kubelet 主机机器的 ISCSI Disk 资源,然后公开给 pod。由管理员调配。  | 
|   
								  |   
								  |   Local 代表带有节点关联性的直接附加存储  | 
|   
								  |   
								  |   mountOptions 是挂载选项的列表,如 ["ro", "soft"]。未验证 - 如果挂载无效,则挂载将失败。更多信息: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options  | 
|   
								  |   
								  |   NFS 代表主机上的 NFS 挂载。由管理员调配。更多信息: https://kubernetes.io/docs/concepts/storage/volumes#nfs  | 
|   
								  |   
								  |   nodeAffinity 定义限制来限制可以从哪个节点访问这个卷。此字段会影响使用这个卷的 pod 的调度。  | 
|   
								  |   
								  |   persistentVolumeReclaimPolicy 定义从声明中释放持久性卷时会发生什么。有效选项为 Retain (手动创建 PersistentVolume 的默认设置)、Delete (动态置备的 PersistentVolume 的默认)和 Recycle (已弃用)。Recycle 必须由此 PersistentVolume 的卷插件支持。更多信息: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming 
								可能枚举值: -   | 
|   
								  |   
								  |   photonPersistentDisk 代表附加并挂载到 kubelets 主机上的 PhotonController 持久磁盘。弃用: PhotonPersistentDisk 已被弃用,in-tree photonPersistentDisk 类型不再被支持。  | 
|   
								  |   
								  |   portworxVolume 代表附加并挂载到 kubelets 主机上的 portworx 卷。已弃用:PortworxVolume 已被弃用。当 CSIMigrationPortworx feature-gate 为 on 时,in-tree portworxVolume 类型的所有操作都会被重定向到 pxd.portworx.com CSI 驱动程序。  | 
|   
								  |   
								  |   quobyte 代表共享 pod 生命周期的主机上执行 Quobyte 挂载。已弃用:Quobyte 已弃用,in-tree Quobyte 类型不再被支持。  | 
|   
								  |   
								  |   RBD 代表共享 pod 生命周期的主机上 Rados 块设备挂载。已弃用:RBD 已被弃用,in-tree rbd 类型不再被支持。更多信息: https://examples.k8s.io/volumes/rbd/README.md  | 
|   
								  |   
								  |   scaleIO 代表附加并挂载到 Kubernetes 节点上的 ScaleIO 持久性卷。已弃用:ScaleIO 已被弃用,in-tree scaleIO 类型不再被支持。  | 
|   
								  |   
								  |   storageClassName 是此持久性卷所属的 StorageClass 的名称。空值表示这个卷不属于任何 StorageClass。  | 
|   
								  |   
								  |   storageos 代表一个 StorageOS 卷,它附加到 kubelet 的主机机器并挂载到 pod。已弃用:StorageOS 已被弃用,in-tree storageos 类型不再被支持。更多信息:https://examples.k8s.io/volumes/storageos/README.md  | 
|   
								  |   
								  |   此持久性卷所属的 VolumeAttributesClass 的名称。不允许为空值。如果没有设置此字段,这表示此卷不属于任何 VolumeAttributesClass。此字段是可变的,可在卷成功更新为新类后由 CSI 驱动程序更改。对于 unbound PersistentVolume,volumeAttributesClassName 将在绑定过程中与 unbound PersistentVolumeClaims 匹配。这是一个 beta 字段,需要启用 VolumeAttributesClass 功能(默认关闭)。  | 
|   
								  |   
								  |   volumeMode 定义卷是否要与格式化的文件系统一起使用,或者保持在原始块状态。当没有包含在 spec 中时,文件系统的值会被表示。 
								可能枚举值: -   | 
|   
								  |   
								  |   vsphereVolume 代表附加并挂载到 kubelets 主机上的 vSphere 卷。已弃用:VsphereVolume 已被弃用。in-tree vsphereVolume 类型的所有操作都会重定向到 csi.vsphere.vmware.com CSI 驱动程序。  |