你正在查看的文档所针对的是 Kubernetes 版本: v1.26

Kubernetes v1.26 版本的文档已不再维护。你现在看到的版本来自于一份静态的快照。如需查阅最新文档,请点击 最新版本。

PodTemplate

PodTemplate 描述一种模板,用来为预定义的 Pod 生成副本。

apiVersion: v1

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

PodTemplate

PodTemplate 描述一种模板,用来为预定义的 Pod 生成副本。


PodTemplateSpec

PodTemplateSpec 描述基于某模板所创建的 Pod 所应具有的数据。


PodTemplateList

PodTemplateList 是 PodTemplate 对象的列表。


  • items ([]PodTemplate),必需

    PodTemplate 对象列表。

操作


get 读取指定的 PodTemplate

HTTP 请求

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

参数

  • name路径参数):string,必需

    PodTemplate 的名称

  • namespace路径参数):string,必需

    namespace

  • pretty查询参数):string

    pretty

响应

200 (PodTemplate): OK

401: Unauthorized

list 列出或监视 PodTemplate 类型的对象

HTTP 请求

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

参数

  • namespace路径参数):string,必需

    namespace

  • continue查询参数):string

    continue

  • limit查询参数):integer

    limit

  • pretty查询参数):string

    pretty

  • watch查询参数):boolean

    watch

响应

200 (PodTemplateList): OK

401: Unauthorized

list 列出或监视 PodTemplate 类型的对象

HTTP 请求

GET /api/v1/podtemplates

参数

  • continue查询参数):string

    continue

  • limit查询参数):integer

    limit

  • pretty查询参数):string

    pretty

  • watch查询参数):boolean

    watch

响应

200 (PodTemplateList): OK

401: Unauthorized

create 创建一个 PodTemplate

HTTP 请求

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

参数

  • namespace路径参数):string,必需

    namespace

  • dryRun查询参数):string

    dryRun

  • pretty查询参数):string

    pretty

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

202 (PodTemplate): Accepted

401: Unauthorized

update 替换指定的 PodTemplate

HTTP 请求

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

参数

  • name路径参数):string,必需

    PodTemplate 的名称

  • namespace路径参数):string,必需

    namespace

  • dryRun查询参数):string

    dryRun

  • pretty查询参数):string

    pretty

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

401: Unauthorized

patch 部分更新指定的 PodTemplate

HTTP 请求

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

参数

  • name路径参数):string,必需

    PodTemplate 的名称

  • namespace路径参数):string,必需

    namespace

  • dryRun查询参数):string

    dryRun

  • force查询参数):boolean

    force

  • pretty查询参数):string

    pretty

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

401: Unauthorized

delete 删除一个 PodTemplate

HTTP 请求

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

参数

  • name路径参数):string,必需

    PodTemplate 的名称

  • dryRun查询参数):string

    dryRun

  • pretty查询参数):string

    pretty

响应

200 (PodTemplate): OK

202 (PodTemplate): Accepted

401: Unauthorized

deletecollection 删除 PodTemplate 的集合

HTTP 请求

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

参数

  • continue查询参数):string

    continue

  • dryRun查询参数):string

    dryRun

  • limit查询参数):integer

    limit

  • pretty查询参数):string

    pretty

响应

200 (Status): OK

401: Unauthorized

最后修改 June 16, 2022 at 11:29 AM PST: [zh] Translate pod-template-v1.md (7978b163b2)