PersistentVolume
apiVersion: v1
import "k8s.io/api/core/v1"
PersistentVolume
PersistentVolume (PV) 是由管理員供應的儲存資源。它類似於一個節點。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes
apiVersion: v1
kind: PersistentVolume
metadata (ObjectMeta)
標準物件的元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (PersistentVolumeSpec)
spec 定義了叢集擁有的持久卷的規範。由管理員提供。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#persistent-volumes
status (PersistentVolumeStatus)
status 表示持久卷的當前資訊/狀態。由系統填充。只讀。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#persistent-volumes
PersistentVolumeSpec
PersistentVolumeSpec 是持久卷的規範。
accessModes ([]string)
原子性:在合併期間將被替換
accessModes 包含卷可以被掛載的所有方式。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#access-modes
capacity (map[string]Quantity)
capacity 是持久卷資源和容量的描述。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#capacity
claimRef (ObjectReference)
claimRef 是 PersistentVolume 和 PersistentVolumeClaim 之間雙向繫結的一個組成部分。繫結時應為非空。claim.VolumeName 是 PV 和 PVC 之間權威性的繫結。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#binding
mountOptions ([]string)
原子性:在合併期間將被替換
mountOptions 是掛載選項列表,例如 ["ro", "soft"]。未經驗證 - 如果有任何無效選項,掛載將失敗。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes/#mount-options
nodeAffinity (VolumeNodeAffinity)
nodeAffinity 定義了限制此卷可以從哪些節點訪問的約束。此欄位會影響使用此卷的 Pod 的排程。
VolumeNodeAffinity 定義了限制此卷可以從哪些節點訪問的約束。
nodeAffinity.required (NodeSelector)
required 指定了必須滿足的硬性節點約束。
節點選擇器表示一個或多個標籤查詢在一組節點上的結果的並集;也就是說,它表示節點選擇器項所表示的選擇器的 OR 運算。
nodeAffinity.required.nodeSelectorTerms ([]NodeSelectorTerm), required
原子性:在合併期間將被替換
必需。節點選擇器項的列表。這些項是 OR 關係。
空或空的節點選擇器項不匹配任何物件。它們的要求是 AND 關係。TopologySelectorTerm 型別實現了 NodeSelectorTerm 的子集。
nodeAffinity.required.nodeSelectorTerms.matchExpressions ([]NodeSelectorRequirement)
原子性:在合併期間將被替換
透過節點標籤列出的節點選擇器要求列表。
nodeAffinity.required.nodeSelectorTerms.matchFields ([]NodeSelectorRequirement)
原子性:在合併期間將被替換
透過節點欄位列出的節點選擇器要求列表。
persistentVolumeReclaimPolicy (string)
persistentVolumeReclaimPolicy 定義了持久卷從其宣告中釋放時會發生什麼。有效選項包括 Retain(手動建立 PersistentVolume 的預設值)、Delete(動態供應 PersistentVolume 的預設值)和 Recycle(已棄用)。Recycle 必須由該 PersistentVolume 底層卷外掛支援。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#reclaiming
storageClassName (string)
storageClassName 是此持久卷所屬的 StorageClass 的名稱。空值表示此卷不屬於任何 StorageClass。
volumeAttributesClassName (string)
此持久卷所屬的 VolumeAttributesClass 的名稱。不允許為空值。如果此欄位未設定,則表示此卷不屬於任何 VolumeAttributesClass。此欄位是可變的,並且在捲成功更新到新類後可以由 CSI 驅動程式更改。對於未繫結的 PersistentVolume,volumeAttributesClassName 將在繫結過程中與未繫結的 PersistentVolumeClaims 匹配。
volumeMode (string)
volumeMode 定義了卷是打算與格式化的檔案系統一起使用,還是保持原始塊狀態。如果未包含在 spec 中,則預設為 Filesystem。
Local
hostPath (HostPathVolumeSource)
hostPath 表示主機上的一個目錄。由開發人員或測試人員提供。這僅適用於單節點開發和測試!多節點叢集中不支援主機儲存,並且無法工作。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#hostpath
表示對映到 Pod 的主機路徑。主機路徑卷不支援所有權管理或 SELinux 重新標記。
hostPath.path (string), required
主機上目錄的路徑。如果該路徑是一個符號連結,它將跟蹤該連結到真實路徑。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#hostpath
hostPath.type (string)
HostPath 卷的型別。預設為 ""。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#hostpath
local (LocalVolumeSource)
local 表示帶有節點親和性的直接連線儲存
local.path (string), required
節點上卷的完整路徑。它可以是目錄或塊裝置(磁碟、分割槽等)。
local.fsType (string)
fsType 是要掛載的檔案系統型別。僅當 Path 是塊裝置時適用。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則預設值是自動選擇檔案系統。
持久卷
awsElasticBlockStore (AWSElasticBlockStoreVolumeSource)
awsElasticBlockStore 表示一個 AWS 磁碟資源,該資源附加到 kubelet 的主機,然後暴露給 Pod。已棄用:AWSElasticBlockStore 已棄用。所有針對樹內 awsElasticBlockStore 型別的操作都重定向到 ebs.csi.aws.com CSI 驅動程式。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#awselasticblockstore
AWS EBS 磁碟必須在掛載到容器之前存在。該磁碟還必須與 kubelet 位於相同的 AWS 區域。AWS EBS 磁碟只能掛載為一次讀/寫。AWS EBS 卷支援所有權管理和 SELinux 重新標記。*
awsElasticBlockStore.volumeID (string), required
volumeID 是 AWS(Amazon EBS 卷)中持久磁碟資源的唯一 ID。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#awselasticblockstore
awsElasticBlockStore.fsType (string)
fsType 是您要掛載的卷的檔案系統型別。提示:確保檔案系統型別受主機作業系統支援。示例:“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#awselasticblockstore
awsElasticBlockStore.partition (int32)
partition 是您要掛載的卷中的分割槽。如果省略,預設是按卷名掛載。示例:對於卷 /dev/sda1,您將分割槽指定為“1”。類似地,/dev/sda 的卷分割槽是“0”(或者您可以將屬性留空)。
awsElasticBlockStore.readOnly (boolean)
readOnly 值為 true 將強制 VolumeMounts 中的只讀設定。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#awselasticblockstore
azureDisk (AzureDiskVolumeSource)
azureDisk 表示主機上的 Azure 資料磁碟掛載並繫結到 Pod。已棄用:AzureDisk 已棄用。所有針對樹內 azureDisk 型別的操作都重定向到 disk.csi.azure.com CSI 驅動程式。
AzureDisk 表示主機上的 Azure 資料磁碟掛載並繫結到 Pod。
azureDisk.diskName (string), required
diskName 是 Blob 儲存中資料磁碟的名稱
azureDisk.diskURI (string), required
diskURI 是 Blob 儲存中資料磁碟的 URI
azureDisk.cachingMode (string)
cachingMode 是主機快取模式:無、只讀、讀寫。
azureDisk.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。
azureDisk.kind (string)
kind 預期值是 Shared:每個儲存賬戶有多個 Blob 磁碟;Dedicated:每個儲存賬戶有單個 Blob 磁碟;Managed:Azure 託管資料磁碟(僅在託管可用性集中)。預設為 Shared。
azureDisk.readOnly (boolean)
readOnly 預設為 false (讀/寫)。這裡的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
azureFile (AzureFilePersistentVolumeSource)
azureFile 表示主機上的 Azure 檔案服務掛載並繫結到 Pod。已棄用:AzureFile 已棄用。所有針對樹內 azureFile 型別的操作都重定向到 file.csi.azure.com CSI 驅動程式。
AzureFile 表示主機上的 Azure 檔案服務掛載並繫結到 Pod。
azureFile.secretName (string), required
secretName 是包含 Azure 儲存賬戶名稱和金鑰的 Secret 名稱
azureFile.shareName (string), required
shareName 是 Azure 共享名稱
azureFile.readOnly (boolean)
readOnly 預設為 false(讀/寫)。此處的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
azureFile.secretNamespace (string)
secretNamespace 是包含 Azure 儲存賬戶名稱和金鑰的 Secret 所在的名稱空間,預設為與 Pod 相同的名稱空間
cephfs (CephFSPersistentVolumeSource)
cephFS 表示主機上 Ceph FS 掛載,與 Pod 生命週期共享。已棄用:CephFS 已棄用,且樹內 cephfs 型別不再受支援。
表示與 Pod 生命週期相同的 Ceph 檔案系統掛載。Cephfs 卷不支援所有權管理或 SELinux 重新標記。
cephfs.monitors ([]string), required
原子性:在合併期間將被替換
monitors 是必需的:Monitors 是 Ceph 監視器的集合。更多資訊:https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
cephfs.path (string)
path 是可選的:用作掛載的根目錄,而不是完整的 Ceph 樹,預設為 /
cephfs.readOnly (boolean)
readOnly 是可選的:預設為 false(讀/寫)。這裡的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。更多資訊:https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
cephfs.secretFile (string)
secretFile 是可選的:SecretFile 是使用者金鑰環的路徑,預設為 /etc/ceph/user.secret。更多資訊:https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
cephfs.secretRef (SecretReference)
secretRef 是可選的:SecretRef 是對使用者認證 Secret 的引用,預設為空。更多資訊:https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
cephfs.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
cephfs.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
cephfs.user (string)
user 是可選的:User 是 rados 使用者名稱,預設為 admin。更多資訊:https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
cinder (CinderPersistentVolumeSource)
cinder 表示掛載並附加到 kubelet 主機上的 cinder 卷。已棄用:Cinder 已棄用。所有針對樹內 cinder 型別的操作都重定向到 cinder.csi.openstack.org CSI 驅動程式。更多資訊:https://examples.k8s.io/mysql-cinder-pd/README.md
表示 Openstack 中的 Cinder 卷資源。Cinder 卷必須在掛載到容器之前存在。該卷還必須與 kubelet 位於相同的區域。Cinder 卷支援所有權管理和 SELinux 重新標記。
cinder.volumeID (string), required
volumeID 用於在 cinder 中標識卷。更多資訊:https://examples.k8s.io/mysql-cinder-pd/README.md
cinder.fsType (string)
fsType 要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。示例:“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。更多資訊:https://examples.k8s.io/mysql-cinder-pd/README.md
cinder.readOnly (boolean)
readOnly 是可選的:預設為 false(讀/寫)。這裡的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。更多資訊:https://examples.k8s.io/mysql-cinder-pd/README.md
cinder.secretRef (SecretReference)
secretRef 是可選的:指向包含用於連線 OpenStack 的引數的 Secret 物件。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
cinder.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
cinder.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi (CSIPersistentVolumeSource)
csi 表示由外部 CSI 驅動程式處理的儲存。
csi.driver (string), required
driver 是用於此卷的驅動程式名稱。必需。
csi.volumeHandle (string), required
volumeHandle 是 CSI 卷外掛的 CreateVolume 返回的唯一卷名,用於在所有後續呼叫中引用該卷。必需。
csi.controllerExpandSecretRef (SecretReference)
controllerExpandSecretRef 是對包含敏感資訊的 Secret 物件的引用,這些資訊將傳遞給 CSI 驅動程式以完成 CSI ControllerExpandVolume 呼叫。此欄位是可選的,如果不需要 Secret,則可以為空。如果 Secret 物件包含多個 Secret,則所有 Secret 都將被傳遞。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
csi.controllerExpandSecretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
csi.controllerExpandSecretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi.controllerPublishSecretRef (SecretReference)
controllerPublishSecretRef 是對 Secret 物件的引用,該 Secret 物件包含敏感資訊,用於傳遞給 CSI 驅動程式以完成 CSI ControllerPublishVolume 和 ControllerUnpublishVolume 呼叫。此欄位是可選的,如果不需要 Secret,則可以為空。如果 Secret 物件包含多個 Secret,則所有 Secret 都將被傳遞。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
csi.controllerPublishSecretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
csi.controllerPublishSecretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi.fsType (string)
fsType 要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。
csi.nodeExpandSecretRef (SecretReference)
nodeExpandSecretRef 是對 Secret 物件的引用,其中包含要傳遞給 CSI 驅動程式以完成 CSI NodeExpandVolume 呼叫的敏感資訊。此欄位是可選的,如果不需要 Secret,則可以省略。如果 Secret 物件包含多個 Secret,則所有 Secret 都將被傳遞。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
csi.nodeExpandSecretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
csi.nodeExpandSecretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi.nodePublishSecretRef (SecretReference)
nodePublishSecretRef 是對 Secret 物件的引用,該 Secret 物件包含敏感資訊,用於傳遞給 CSI 驅動程式以完成 CSI NodePublishVolume 和 NodeUnpublishVolume 呼叫。此欄位是可選的,如果不需要 Secret,則可以為空。如果 Secret 物件包含多個 Secret,則所有 Secret 都將被傳遞。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
csi.nodePublishSecretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
csi.nodePublishSecretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi.nodeStageSecretRef (SecretReference)
nodeStageSecretRef 是對 Secret 物件的引用,其中包含要傳遞給 CSI 驅動程式的敏感資訊,以完成 CSI NodeStageVolume 和 NodeUnstageVolume 呼叫。此欄位是可選的,如果不需要 Secret,則可以為空。如果 Secret 物件包含多個 Secret,則所有 Secret 都將被傳遞。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
csi.nodeStageSecretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
csi.nodeStageSecretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
csi.readOnly (boolean)
readOnly 值傳遞給 ControllerPublishVolumeRequest。預設為 false(讀/寫)。
csi.volumeAttributes (map[string]string)
要釋出的卷的 volumeAttributes。
fc (FCVolumeSource)
fc 表示連線到 kubelet 主機然後暴露給 Pod 的光纖通道資源。
表示光纖通道卷。光纖通道卷只能掛載為一次讀/寫。光纖通道卷支援所有權管理和 SELinux 重新標記。
fc.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。
fc.lun (int32)
lun 是可選的:FC 目標 lun 號
fc.readOnly (boolean)
readOnly 是可選的:預設為 false (讀/寫)。這裡的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
fc.targetWWNs ([]string)
原子性:在合併期間將被替換
targetWWNs 是可選的:FC 目標全球名稱 (WWN)
fc.wwids ([]string)
原子性:在合併期間將被替換
wwids 可選:FC 卷全球識別符號 (wwid) 必須設定 wwids 或 targetWWNs 和 lun 的組合,但不能同時設定兩者。
flexVolume (FlexPersistentVolumeSource)
flexVolume 表示使用基於 exec 的外掛供應/附加的通用卷資源。已棄用:FlexVolume 已棄用。請考慮改用 CSIDriver。
FlexPersistentVolumeSource 表示一個通用持久卷資源,該資源使用基於 exec 的外掛進行供應/附加。
flexVolume.driver (string), required
driver 是用於此卷的驅動程式名稱。
flexVolume.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。預設檔案系統取決於 FlexVolume 指令碼。
flexVolume.options (map[string]string)
options 是可選的:此欄位包含任何額外的命令選項。
flexVolume.readOnly (boolean)
readOnly 是可選的:預設為 false (讀/寫)。此處的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
flexVolume.secretRef (SecretReference)
secretRef 是可選的:SecretRef 是對 Secret 物件的引用,該物件包含要傳遞給外掛指令碼的敏感資訊。如果未指定 Secret 物件,則可以為空。如果 Secret 物件包含多個 Secret,則所有 Secret 都將傳遞給外掛指令碼。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
flexVolume.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
flexVolume.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
flocker (FlockerVolumeSource)
flocker 表示一個 Flocker 卷,該卷附加到 kubelet 的主機並暴露給 Pod 使用。這取決於 Flocker 控制服務正在執行。已棄用:Flocker 已棄用,且樹內 flocker 型別不再受支援。
表示由 Flocker 代理掛載的 Flocker 卷。datasetName 和 datasetUUID 中只能設定一個。Flocker 卷不支援所有權管理或 SELinux 重新標記。
flocker.datasetName (string)
datasetName 是儲存為元資料中資料集名稱的名稱 -> Flocker 資料集上的名稱應被視為已棄用
flocker.datasetUUID (string)
datasetUUID 是資料集的 UUID。這是 Flocker 資料集的唯一識別符號
gcePersistentDisk (GCEPersistentDiskVolumeSource)
gcePersistentDisk 表示一個 GCE 磁碟資源,該資源附加到 kubelet 的主機,然後暴露給 Pod。由管理員提供。已棄用:GCEPersistentDisk 已棄用。所有針對樹內 gcePersistentDisk 型別的操作都重定向到 pd.csi.storage.gke.io CSI 驅動程式。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#gcepersistentdisk
*表示 Google Compute Engine 中的持久磁碟資源。
GCE PD 必須在掛載到容器之前存在。該磁碟還必須與 kubelet 位於相同的 GCE 專案和區域。GCE PD 只能掛載為一次讀/寫或多次只讀。GCE PD 支援所有權管理和 SELinux 重新標記。*
gcePersistentDisk.pdName (string), required
pdName 是 GCE 中 PD 資源的唯一名稱。用於在 GCE 中標識磁碟。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#gcepersistentdisk
gcePersistentDisk.fsType (string)
fsType 是您要掛載的卷的檔案系統型別。提示:確保檔案系統型別受主機作業系統支援。示例:“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#gcepersistentdisk
gcePersistentDisk.partition (int32)
partition 是您要掛載的卷中的分割槽。如果省略,預設是按卷名掛載。示例:對於卷 /dev/sda1,您將分割槽指定為“1”。類似地,/dev/sda 的卷分割槽是“0”(或者您可以將屬性留空)。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#gcepersistentdisk
gcePersistentDisk.readOnly (boolean)
此處的 readOnly 將強制 VolumeMounts 中的 ReadOnly 設定。預設為 false。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#gcepersistentdisk
glusterfs (GlusterfsPersistentVolumeSource)
glusterfs 表示連線到主機並暴露給 Pod 的 Glusterfs 卷。由管理員提供。已棄用:Glusterfs 已棄用,且樹內 glusterfs 型別不再受支援。更多資訊:https://examples.k8s.io/volumes/glusterfs/README.md
表示與 Pod 生命週期相同的 Glusterfs 掛載。Glusterfs 卷不支援所有權管理或 SELinux 重新標記。
glusterfs.endpoints (string), required
endpoints 是 Glusterfs 拓撲的端點名稱。更多資訊:https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
glusterfs.path (string), required
path 是 Glusterfs 卷路徑。更多資訊:https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
glusterfs.endpointsNamespace (string)
endpointsNamespace 是包含 Glusterfs 端點的名稱空間。如果此欄位為空,則 EndpointNamespace 預設為與繫結的 PVC 相同的名稱空間。更多資訊:https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
glusterfs.readOnly (boolean)
此處的 readOnly 將強制 Glusterfs 卷以只讀許可權掛載。預設為 false。更多資訊:https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
iscsi (ISCSIPersistentVolumeSource)
iscsi 表示一個 ISCSI 磁碟資源,該資源附加到 kubelet 的主機,然後暴露給 Pod。由管理員提供。
ISCSIPersistentVolumeSource 表示一個 ISCSI 磁碟。ISCSI 卷只能掛載為一次讀/寫。ISCSI 卷支援所有權管理和 SELinux 重新標記。
iscsi.iqn (string), required
iqn 是目標 iSCSI 合格名稱。
iscsi.lun (int32), required
lun 是 iSCSI 目標 LUN 號。
iscsi.targetPortal (string), required
targetPortal 是 iSCSI 目標門戶。如果埠不是預設埠(通常是 TCP 埠 860 和 3260),則門戶可以是 IP 地址或 ip_addr:port。
iscsi.chapAuthDiscovery (boolean)
chapAuthDiscovery 定義是否支援 iSCSI 發現 CHAP 認證
iscsi.chapAuthSession (boolean)
chapAuthSession 定義是否支援 iSCSI 會話 CHAP 認證
iscsi.fsType (string)
fsType 是您要掛載的卷的檔案系統型別。提示:確保檔案系統型別受主機作業系統支援。示例:“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#iscsi
iscsi.initiatorName (string)
initiatorName 是自定義 iSCSI 發起方名稱。如果 initiatorName 與 iscsiInterface 同時指定,則將為連線建立新的 iSCSI 介面 <目標門戶>:<卷名>。
iscsi.iscsiInterface (string)
iscsiInterface 是使用 iSCSI 傳輸的介面名稱。預設為“default”(tcp)。
iscsi.portals ([]string)
原子性:在合併期間將被替換
portals 是 iSCSI 目標門戶列表。如果埠不是預設埠(通常是 TCP 埠 860 和 3260),則門戶可以是 IP 地址或 ip_addr:port。
iscsi.readOnly (boolean)
此處的 readOnly 將強制 VolumeMounts 中的 ReadOnly 設定。預設為 false。
iscsi.secretRef (SecretReference)
secretRef 是用於 iSCSI 目標和發起方認證的 CHAP Secret
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
iscsi.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
iscsi.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
nfs (NFSVolumeSource)
nfs 表示主機上的 NFS 掛載。由管理員提供。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#nfs
表示與 Pod 生命週期相同的 NFS 掛載。NFS 卷不支援所有權管理或 SELinux 重新標記。
nfs.path (string), required
NFS 伺服器匯出的路徑。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#nfs
nfs.server (string), required
server 是 NFS 伺服器的主機名或 IP 地址。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#nfs
nfs.readOnly (boolean)
此處的 readOnly 將強制 NFS 匯出以只讀許可權掛載。預設為 false。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#nfs
photonPersistentDisk (PhotonPersistentDiskVolumeSource)
photonPersistentDisk 表示掛載並附加到 kubelet 主機上的 PhotonController 持久磁碟。已棄用:PhotonPersistentDisk 已棄用,且樹內 photonPersistentDisk 型別不再受支援。
photonPersistentDisk.pdID (string), required
pdID 是標識 Photon Controller 持久磁碟的 ID
photonPersistentDisk.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。
portworxVolume (PortworxVolumeSource)
portworxVolume 表示連線並掛載到 kubelet 主機上的 Portworx 卷。已棄用:PortworxVolume 已棄用。當 CSIMigrationPortworx 功能門開啟時,所有針對樹內 portworxVolume 型別的操作都將重定向到 pxd.portworx.com CSI 驅動程式。
PortworxVolumeSource 表示 Portworx 卷資源。
portworxVolume.volumeID (string), required
volumeID 唯一標識 Portworx 卷
portworxVolume.fsType (string)
fSType 表示要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”。如果未指定,則隱含推斷為“ext4”。
portworxVolume.readOnly (boolean)
readOnly 預設為 false(讀/寫)。此處的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
quobyte (QuobyteVolumeSource)
quobyte 表示主機上的 Quobyte 掛載,與 Pod 生命週期共享。已棄用:Quobyte 已棄用,且樹內 quobyte 型別不再受支援。
表示與 Pod 生命週期相同的 Quobyte 掛載。Quobyte 卷不支援所有權管理或 SELinux 重新標記。
quobyte.registry (string), required
registry 表示單個或多個 Quobyte 註冊服務,以 host:port 對的字串形式指定(多個條目用逗號分隔),作為卷的中央註冊中心。
quobyte.volume (string), required
volume 是一個字串,透過名稱引用已建立的 Quobyte 卷。
quobyte.group (string)
group 用於將卷訪問對映到。預設為無組。
quobyte.readOnly (boolean)
此處的 readOnly 將強制 Quobyte 卷以只讀許可權掛載。預設為 false。
quobyte.tenant (string)
擁有後端給定 Quobyte 卷的租戶。與動態供應的 Quobyte 卷一起使用,值由外掛設定。
quobyte.user (string)
user 用於將卷訪問對映到。預設為服務賬戶使用者。
rbd (RBDPersistentVolumeSource)
rbd 表示主機上一個 Rados 塊裝置掛載,與 Pod 生命週期共享。已棄用:RBD 已棄用,且樹內 rbd 型別不再受支援。更多資訊:https://examples.k8s.io/volumes/rbd/README.md
表示與 Pod 生命週期相同的 Rados 塊裝置掛載。RBD 卷支援所有權管理和 SELinux 重新標記。
rbd.image (string), required
image 是 rados 映象名稱。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
rbd.monitors ([]string), required
原子性:在合併期間將被替換
monitors 是 Ceph 監視器的集合。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
rbd.fsType (string)
fsType 是您要掛載的卷的檔案系統型別。提示:確保檔案系統型別受主機作業系統支援。示例:“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/volumes#rbd
rbd.keyring (string)
keyring 是 RBDUser 金鑰環的路徑。預設為 /etc/ceph/keyring。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
rbd.pool (string)
pool 是 rados 儲存池名稱。預設為 rbd。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
rbd.readOnly (boolean)
此處的 readOnly 將強制 VolumeMounts 中的 ReadOnly 設定。預設為 false。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
rbd.secretRef (SecretReference)
secretRef 是 RBDUser 認證 Secret 的名稱。如果提供,將覆蓋 keyring。預設為 nil。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
rbd.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
rbd.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
rbd.user (string)
user 是 rados 使用者名稱。預設為 admin。更多資訊:https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
scaleIO (ScaleIOPersistentVolumeSource)
scaleIO 表示掛載並附加到 Kubernetes 節點上的 ScaleIO 持久卷。已棄用:ScaleIO 已棄用,且樹內 scaleIO 型別不再受支援。
ScaleIOPersistentVolumeSource 表示一個持久的 ScaleIO 卷
scaleIO.gateway (string), required
gateway 是 ScaleIO API 閘道器的主機地址。
scaleIO.secretRef (SecretReference), required
secretRef 引用 ScaleIO 使用者和其他敏感資訊的 Secret。如果未提供,登入操作將失敗。
SecretReference 表示一個 Secret 引用。它包含足夠的資訊以檢索任何名稱空間中的 Secret
scaleIO.secretRef.name (string)
name 在名稱空間內是唯一的,用於引用 Secret 資源。
scaleIO.secretRef.namespace (string)
namespace 定義了 Secret 名稱必須唯一的空間。
scaleIO.system (string), required
system 是 ScaleIO 中配置的儲存系統名稱。
scaleIO.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。預設為“xfs”。
scaleIO.protectionDomain (string)
protectionDomain 是配置儲存的 ScaleIO 保護域名稱。
scaleIO.readOnly (boolean)
readOnly 預設為 false(讀/寫)。此處的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
scaleIO.sslEnabled (boolean)
sslEnabled 是啟用/停用與閘道器的 SSL 通訊的標誌,預設為 false
scaleIO.storageMode (string)
storageMode 指示卷的儲存是 ThickProvisioned 還是 ThinProvisioned。預設為 ThinProvisioned。
scaleIO.storagePool (string)
storagePool 是與保護域關聯的 ScaleIO 儲存池。
scaleIO.volumeName (string)
volumeName 是已在 ScaleIO 系統中建立的、與此卷源關聯的卷的名稱。
storageos (StorageOSPersistentVolumeSource)
storageOS 表示一個 StorageOS 卷,該卷附加到 kubelet 的主機並掛載到 Pod 中。已棄用:StorageOS 已棄用,且樹內 storageos 型別不再受支援。更多資訊:https://examples.k8s.io/volumes/storageos/README.md
storageos.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。
storageos.readOnly (boolean)
readOnly 預設為 false(讀/寫)。此處的 ReadOnly 將強制 VolumeMounts 中的 ReadOnly 設定。
storageos.secretRef (ObjectReference)
secretRef 指定用於獲取 StorageOS API 憑據的 Secret。如果未指定,將嘗試使用預設值。
storageos.volumeName (string)
volumeName 是 StorageOS 卷的可讀名稱。卷名稱只在名稱空間內唯一。
storageos.volumeNamespace (string)
volumeNamespace 指定 StorageOS 中卷的範圍。如果沒有指定名稱空間,將使用 Pod 的名稱空間。這允許 Kubernetes 命名範圍在 StorageOS 中映象,以實現更緊密的整合。將 VolumeName 設定為任何名稱以覆蓋預設行為。如果您未在 StorageOS 中使用名稱空間,則設定為“default”。StorageOS 中不存在的名稱空間將被建立。
vsphereVolume (VsphereVirtualDiskVolumeSource)
vsphereVolume 表示一個 vSphere 卷,該卷附加並掛載到 kubelet 的主機上。已棄用:VsphereVolume 已棄用。所有針對樹內 vsphereVolume 型別的操作都重定向到 csi.vsphere.vmware.com CSI 驅動程式。
vsphereVolume.volumePath (string), required
volumePath 是標識 vSphere 卷 vmdk 的路徑
vsphereVolume.fsType (string)
fsType 是要掛載的檔案系統型別。必須是主機作業系統支援的檔案系統型別。例如“ext4”、“xfs”、“ntfs”。如果未指定,則隱含推斷為“ext4”。
vsphereVolume.storagePolicyID (string)
storagePolicyID 是與 StoragePolicyName 關聯的儲存策略基於管理 (SPBM) 配置檔案 ID。
vsphereVolume.storagePolicyName (string)
storagePolicyName 是基於儲存策略管理 (SPBM) 的配置檔名稱。
PersistentVolumeStatus
PersistentVolumeStatus 是持久卷的當前狀態。
lastPhaseTransitionTime (Time)
lastPhaseTransitionTime 是階段從一個過渡到另一個的時間,並且每次卷階段過渡時都會自動重置為當前時間。
Time 是 time.Time 的一個包裝器,支援正確地編組到 YAML 和 JSON。提供了 time 包提供的許多工廠方法的包裝器。
message (string)
message 是一個人類可讀的訊息,指示卷處於此狀態的詳細資訊。
phase (string)
phase 指示卷是可用、已繫結到宣告,還是由宣告釋放。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes#phase
reason (string)
reason 是一個簡短的 CamelCase 字串,描述任何故障,用於機器解析和在 CLI 中整齊顯示。
PersistentVolumeList
PersistentVolumeList 是 PersistentVolume 項的列表。
apiVersion: v1
kind: PersistentVolumeList
metadata (ListMeta)
標準列表元資料。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]PersistentVolume), required
items 是持久卷列表。更多資訊:https://kubernetes.club.tw/docs/concepts/storage/persistent-volumes
操作
get
讀取指定的 PersistentVolume
HTTP 請求
GET /api/v1/persistentvolumes/{name}
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
401: 未授權
get
讀取指定 PersistentVolume 的狀態
HTTP 請求
GET /api/v1/persistentvolumes/{name}/status
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
401: 未授權
list
列出或監視 PersistentVolume 型別的物件
HTTP 請求
GET /api/v1/persistentvolumes
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (PersistentVolumeList): 成功
401: 未授權
create
建立一個 PersistentVolume
HTTP 請求
POST /api/v1/persistentvolumes
引數
body: PersistentVolume, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
201 (PersistentVolume): 已建立
202 (PersistentVolume): 已接受
401: 未授權
update
替換指定的 PersistentVolume
HTTP 請求
PUT /api/v1/persistentvolumes/{name}
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
body: PersistentVolume, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
201 (PersistentVolume): 已建立
401: 未授權
update
替換指定 PersistentVolume 的狀態
HTTP 請求
PUT /api/v1/persistentvolumes/{name}/status
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
body: PersistentVolume, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
201 (PersistentVolume): 已建立
401: 未授權
patch
部分更新指定的 PersistentVolume
HTTP 請求
PATCH /api/v1/persistentvolumes/{name}
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
201 (PersistentVolume): 已建立
401: 未授權
patch
部分更新指定 PersistentVolume 的狀態
HTTP 請求
PATCH /api/v1/persistentvolumes/{name}/status
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (PersistentVolume): 成功
201 (PersistentVolume): 已建立
401: 未授權
delete
刪除一個 PersistentVolume
HTTP 請求
DELETE /api/v1/persistentvolumes/{name}
引數
name (在路徑中): string,必填
PersistentVolume 的名稱
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (PersistentVolume): 成功
202 (PersistentVolume): 已接受
401: 未授權
deletecollection
刪除 PersistentVolume 集合
HTTP 請求
DELETE /api/v1/persistentvolumes
引數
body: DeleteOptions
continue (在查詢中): string
dryRun (在查詢中): string
fieldSelector (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
propagationPolicy (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
響應
200 (Status): OK
401: 未授權
本頁面是自動生成的。
如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。