PodTemplate

PodTemplate 描述了建立預定義 Pod 副本的模板。

apiVersion: v1

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

PodTemplate

PodTemplate 描述了建立預定義 Pod 副本的模板。


PodTemplateSpec

PodTemplateSpec 描述了從模板建立 Pod 時 Pod 應具有的資料。


PodTemplateList

PodTemplateList 是 PodTemplate 的列表。


操作


get 讀取指定的 PodTemplate

HTTP 請求

GET /api/v1/namespaces/{namespace}/podtemplates/{name}

引數

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

    PodTemplate 的名稱

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

    名稱空間

  • pretty (在查詢中): string

    pretty

響應

200 (PodTemplate): 正常

401: 未授權

list 列出或監視 PodTemplate 型別的物件

HTTP 請求

GET /api/v1/namespaces/{namespace}/podtemplates

引數

響應

200 (PodTemplateList): 正常

401: 未授權

list 列出或監視 PodTemplate 型別的物件

HTTP 請求

GET /api/v1/podtemplates

引數

響應

200 (PodTemplateList): 正常

401: 未授權

create 建立一個 PodTemplate

HTTP 請求

POST /api/v1/namespaces/{namespace}/podtemplates

引數

響應

200 (PodTemplate): 正常

201 (PodTemplate): 已建立

202 (PodTemplate): 已接受

401: 未授權

update 替換指定的 PodTemplate

HTTP 請求

PUT /api/v1/namespaces/{namespace}/podtemplates/{name}

引數

響應

200 (PodTemplate): 正常

201 (PodTemplate): 已建立

401: 未授權

patch 部分更新指定的 PodTemplate

HTTP 請求

PATCH /api/v1/namespaces/{namespace}/podtemplates/{name}

引數

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

    PodTemplate 的名稱

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

    名稱空間

  • body: Patch,必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • force (在查詢中): boolean

    force

  • pretty (在查詢中): string

    pretty

響應

200 (PodTemplate): 正常

201 (PodTemplate): 已建立

401: 未授權

delete 刪除一個 PodTemplate

HTTP 請求

DELETE /api/v1/namespaces/{namespace}/podtemplates/{name}

引數

響應

200 (PodTemplate): 正常

202 (PodTemplate): 已接受

401: 未授權

deletecollection 刪除 PodTemplate 集合

HTTP 請求

DELETE /api/v1/namespaces/{namespace}/podtemplates

引數

響應

200 (Status): OK

401: 未授權

本頁面是自動生成的。

如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。

上次修改時間:2025 年 4 月 9 日太平洋標準時間下午 6:36:更新 v1.32 的 API 參考文件 (a3b579d035)