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