您正在查看 Kubernetes 版本的文档: v1.24

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

ReplicationController

ReplicationController 表示一个副本控制器的配置。

apiVersion: v1

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

ReplicationController

ReplicationController 表示一个副本控制器的配置。


  • apiVersion: v1

  • kind: ReplicationController

ReplicationControllerSpec

ReplicationControllerSpec 表示一个副本控制器的规约。


ReplicationControllerStatus

ReplicationControllerStatus 表示一个副本控制器的当前状态。


  • readyReplicas (int32)

    此副本控制器所用的就绪副本的数量。

  • fullyLabeledReplicas (int32)

    标签与副本控制器的 Pod 模板标签匹配的 Pod 数量。

  • conditions ([]ReplicationControllerCondition)

    补丁策略:按照键 type 合并

    表示副本控制器当前状态的最新可用观测值。

    ReplicationControllerCondition 描述某个点的副本控制器的状态。

    • conditions.status (string),必需

      状况的状态,取值为 True、False 或 Unknown 之一。

    • conditions.type (string),必需

      副本控制器状况的类型。

    • conditions.lastTransitionTime (Time)

      状况上次从一个状态转换为另一个状态的时间。

      Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。 为 time 包的许多函数方法提供了封装器。

    • conditions.message (string)

    这是一条人类可读的消息,指示有关上次转换的详细信息。

    • conditions.reason (string)

      状况上次转换的原因。

  • observedGeneration (int64)

    observedGeneration 反映了最近观测到的副本控制器的生成情况。

ReplicationControllerList

ReplicationControllerList 是副本控制器的集合。


  • apiVersion: v1

  • kind: ReplicationControllerList

操作


get 读取指定的 ReplicationController

HTTP 请求

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

参数

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

    ReplicationController 的名称

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

    namespace

  • pretty (查询参数): string

    pretty

响应

200 (ReplicationController): OK

401: Unauthorized

get 读取指定的 ReplicationController 的状态

HTTP 请求

GET /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status

参数

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

    ReplicationController 的名称

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

    namespace

  • pretty (查询参数): string

    pretty

响应

200 (ReplicationController): OK

401: Unauthorized

list 列出或监视 ReplicationController 类别的对象

HTTP 请求

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

参数

响应

200 (ReplicationControllerList): OK

401: Unauthorized

list 列出或监视 ReplicationController 类别的对象

HTTP 请求

GET /api/v1/replicationcontrollers

参数

响应

200 (ReplicationControllerList): OK

401: Unauthorized

create 创建 ReplicationController

HTTP 请求

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

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

202 (ReplicationController): Accepted

401: Unauthorized

update 替换指定的 ReplicationController

HTTP 请求

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

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

update 替换指定的 ReplicationController 的状态

HTTP 请求

PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

patch 部分更新指定的 ReplicationController

HTTP 请求

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

参数

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

    ReplicationController 的名称

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

    namespace

  • body: Patch,必需

  • dryRun (查询参数): string

    dryRun

  • fieldManager (查询参数): string

    fieldManager

  • fieldValidation (查询参数): string

    fieldValidation

  • force (查询参数): boolean

    force

  • pretty (查询参数): string

    pretty

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

patch 部分更新指定的 ReplicationController 的状态

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status

参数

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

    ReplicationController 的名称

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

    namespace

  • body: Patch,必需

  • dryRun (查询参数): string

    dryRun

  • fieldManager (查询参数): string

    fieldManager

  • fieldValidation (查询参数): string

    fieldValidation

  • force (查询参数): boolean

    force

  • pretty (查询参数): string

    pretty

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

delete 删除 ReplicationController

HTTP 请求

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

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 ReplicationController 的集合

HTTP 请求

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

参数

响应

200 (Status): OK

401: Unauthorized