VolumeAttachment

VolumeAttachment 捕捉將指定的卷掛載或卸載到指定節點的意圖。

apiVersion: storage.k8s.io/v1

import "k8s.io/api/storage/v1"

VolumeAttachment

VolumeAttachment 捕捉將指定的卷掛載或卸載到指定節點的意圖。

VolumeAttachment 物件是非命名空間的。


VolumeAttachmentSpec

VolumeAttachmentSpec 是 VolumeAttachment 請求的規格。


  • attacher (string), 必填

    attacher 指出必須處理此請求的卷驅動程式名稱。這是 GetPluginName() 傳回的名稱。

  • nodeName (string), 必填

    nodeName 代表卷應掛載到的節點。

  • source (VolumeAttachmentSource), 必填

    source 代表應掛載的卷。

    VolumeAttachmentSource 代表應掛載的卷。目前只有 PersistenVolumes 可以透過外部掛載程式掛載,未來我們也可能允許 Pod 中的內嵌卷。只能設定一個成員。

    • source.inlineVolumeSpec (PersistentVolumeSpec)

      inlineVolumeSpec 包含掛載由 Pod 的內嵌 VolumeSource 定義的持久卷所需的所有資訊。此欄位僅針對 CSIMigration 功能填入。它包含從 Pod 的內嵌 VolumeSource 翻譯到 PersistentVolumeSpec 的欄位。此欄位為 Beta 級別,且僅由啟用 CSIMigration 功能的伺服器處理。

    • source.persistentVolumeName (string)

      persistentVolumeName 代表要掛載的持久卷名稱。

VolumeAttachmentStatus

VolumeAttachmentStatus 是 VolumeAttachment 請求的狀態。


  • attached (boolean), 必填

    attached 指出卷已成功掛載。此欄位必須僅由完成掛載操作的實體(即 external-attacher)設定。

  • attachError (VolumeError)

    attachError 代表在掛載操作期間遇到的最後一個錯誤(如果有的話)。此欄位必須僅由完成掛載操作的實體(即 external-attacher)設定。

    VolumeError 捕捉在卷操作期間遇到的錯誤。

    • attachError.message (string)

      message 代表在掛載或卸載操作期間遇到的錯誤。此字串可能會被記錄,因此不應包含敏感資訊。

    • attachError.time (Time)

      time 代表遇到錯誤的時間。

      Time 是 time.Time 的包裝函式,支援正確地封送處理至 YAML 和 JSON。為 time 套件提供的許多工廠方法提供包裝函式。

  • attachmentMetadata (map[string]string)

    attachmentMetadata 填入掛載操作傳回的任何資訊,在成功掛載時,必須傳遞到後續的 WaitForAttach 或 Mount 呼叫中。此欄位必須僅由完成掛載操作的實體(即 external-attacher)設定。

  • detachError (VolumeError)

    detachError 代表在卸載操作期間遇到的最後一個錯誤(如果有的話)。此欄位必須僅由完成卸載操作的實體(即 external-attacher)設定。

    VolumeError 捕捉在卷操作期間遇到的錯誤。

    • detachError.message (string)

      message 代表在掛載或卸載操作期間遇到的錯誤。此字串可能會被記錄,因此不應包含敏感資訊。

    • detachError.time (Time)

      time 代表遇到錯誤的時間。

      Time 是 time.Time 的包裝函式,支援正確地封送處理至 YAML 和 JSON。為 time 套件提供的許多工廠方法提供包裝函式。

VolumeAttachmentList

VolumeAttachmentList 是 VolumeAttachment 物件的集合。


操作


get 讀取指定的 VolumeAttachment

HTTP 請求

GET /apis/storage.k8s.io/v1/volumeattachments/{name}

參數

  • name (在路徑中): string, 必填

    VolumeAttachment 的名稱

  • pretty (在查詢中): string

    pretty

回應

200 (VolumeAttachment): OK

401: 未經授權

get 讀取指定 VolumeAttachment 的狀態

HTTP 請求

GET /apis/storage.k8s.io/v1/volumeattachments/{name}/status

參數

  • name (在路徑中): string, 必填

    VolumeAttachment 的名稱

  • pretty (在查詢中): string

    pretty

回應

200 (VolumeAttachment): OK

401: 未經授權

list 列出或監看 VolumeAttachment 類型的物件

HTTP 請求

GET /apis/storage.k8s.io/v1/volumeattachments

參數

回應

200 (VolumeAttachmentList): OK

401: 未經授權

create 建立 VolumeAttachment

HTTP 請求

POST /apis/storage.k8s.io/v1/volumeattachments

參數

回應

200 (VolumeAttachment): OK

201 (VolumeAttachment): 已建立

202 (VolumeAttachment): 已接受

401: 未經授權

update 取代指定的 VolumeAttachment

HTTP 請求

PUT /apis/storage.k8s.io/v1/volumeattachments/{name}

參數

回應

200 (VolumeAttachment): OK

201 (VolumeAttachment): 已建立

401: 未經授權

update 取代指定 VolumeAttachment 的狀態

HTTP 請求

PUT /apis/storage.k8s.io/v1/volumeattachments/{name}/status

參數

回應

200 (VolumeAttachment): OK

201 (VolumeAttachment): 已建立

401: 未經授權

patch 部分更新指定的 VolumeAttachment

HTTP 請求

PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}

參數

  • name (在路徑中): string, 必填

    VolumeAttachment 的名稱

  • body: Patch,必要

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (in query): 字串

    fieldManager

  • fieldValidation (in query): 字串

    fieldValidation

  • force (in query): 布林值

    force

  • pretty (在查詢中): string

    pretty

回應

200 (VolumeAttachment): OK

201 (VolumeAttachment): 已建立

401: 未經授權

patch 部分更新指定 VolumeAttachment 的狀態

HTTP 請求

PATCH /apis/storage.k8s.io/v1/volumeattachments/{name}/status

參數

  • name (在路徑中): string, 必填

    VolumeAttachment 的名稱

  • body: Patch,必要

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (in query): 字串

    fieldManager

  • fieldValidation (in query): 字串

    fieldValidation

  • force (in query): 布林值

    force

  • pretty (在查詢中): string

    pretty

回應

200 (VolumeAttachment): OK

201 (VolumeAttachment): 已建立

401: 未經授權

delete 刪除 VolumeAttachment

HTTP 請求

DELETE /apis/storage.k8s.io/v1/volumeattachments/{name}

參數

回應

200 (VolumeAttachment): OK

202 (VolumeAttachment): 已接受

401: 未經授權

deletecollection 刪除 VolumeAttachment 集合

HTTP 請求

DELETE /apis/storage.k8s.io/v1/volumeattachments

參數

回應

200 (Status): 成功

401: 未經授權

此頁面為自動產生。

如果您計畫回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。 修正可能需要在 Kubernetes 專案的其他地方進行。

上次修改時間:2024年8月28日下午 6:01 PST:更新 v1.31 的自動產生 API 參考文件 (8ba98c79c1)