複製控制器

ReplicationController 代表一個副本控制器的配置。

apiVersion: v1

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

複製控制器

ReplicationController 代表一個副本控制器的配置。


ReplicationControllerSpec

ReplicationControllerSpec 是副本控制器的規範。


ReplicationControllerStatus

ReplicationControllerStatus 代表副本控制器的當前狀態。


  • replicas (int32),必需

    Replicas 是最近觀察到的副本數量。更多資訊:https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller

  • availableReplicas (int32)

    此副本控制器可用副本的數量(至少在 minReadySeconds 內準備就緒)。

  • readyReplicas (int32)

    此副本控制器準備就緒副本的數量。

  • fullyLabeledReplicas (int32)

    具有與副本控制器的 Pod 模板標籤匹配的標籤的 Pod 數量。

  • conditions ([]ReplicationControllerCondition)

    補丁策略:按鍵 type 合併

    對映:合併時將保留鍵型別上的唯一值

    表示副本控制器當前狀態的最新可用觀察結果。

    ReplicationControllerCondition 描述了副本控制器在某個時間點的狀態。

    • conditions.status (string),必需

      條件的 status,可以是 True、False、Unknown 之一。

    • conditions.type (string),必需

      副本控制器條件的型別。

    • conditions.lastTransitionTime (Time)

      條件從一種狀態轉換為另一種狀態的最後時間。

      Time 是 time.Time 的一個包裝器,支援正確地編組到 YAML 和 JSON。提供了 time 包提供的許多工廠方法的包裝器。

    • conditions.message (string)

      一個人類可讀的訊息,指示有關轉換的詳細資訊。

    • conditions.reason (string)

      條件上次轉換的原因。

  • observedGeneration (int64)

    ObservedGeneration 反映了最近觀察到的副本控制器的世代。

ReplicationControllerList

ReplicationControllerList 是副本控制器的集合。


操作


get 讀取指定的 ReplicationController

HTTP 請求

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

引數

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

    ReplicationController 的名稱

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

    名稱空間

  • pretty (在查詢中): string

    pretty

響應

200 (ReplicationController): 正常

401: 未授權

get 讀取指定 ReplicationController 的狀態

HTTP 請求

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

引數

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

    ReplicationController 的名稱

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

    名稱空間

  • pretty (在查詢中): string

    pretty

響應

200 (ReplicationController): 正常

401: 未授權

list 列出或觀察 ReplicationController 型別的物件

HTTP 請求

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

引數

響應

200 (ReplicationControllerList): 正常

401: 未授權

list 列出或觀察 ReplicationController 型別的物件

HTTP 請求

GET /api/v1/replicationcontrollers

引數

響應

200 (ReplicationControllerList): 正常

401: 未授權

create 建立一個 ReplicationController

HTTP 請求

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

引數

響應

200 (ReplicationController): 正常

201 (ReplicationController): 已建立

202 (ReplicationController): 已接受

401: 未授權

update 替換指定的 ReplicationController

HTTP 請求

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

引數

響應

200 (ReplicationController): 正常

201 (ReplicationController): 已建立

401: 未授權

update 替換指定 ReplicationController 的狀態

HTTP 請求

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

引數

響應

200 (ReplicationController): 正常

201 (ReplicationController): 已建立

401: 未授權

patch 部分更新指定的 ReplicationController

HTTP 請求

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

引數

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

    ReplicationController 的名稱

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

    名稱空間

  • body: Patch,必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • force (在查詢中): boolean

    force

  • pretty (在查詢中): string

    pretty

響應

200 (ReplicationController): 正常

201 (ReplicationController): 已建立

401: 未授權

patch 部分更新指定 ReplicationController 的狀態

HTTP 請求

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

引數

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

    ReplicationController 的名稱

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

    名稱空間

  • body: Patch,必需

  • dryRun (在查詢中): string

    dryRun

  • fieldManager (在查詢中): string

    fieldManager

  • fieldValidation (在查詢中): string

    fieldValidation

  • force (在查詢中): boolean

    force

  • pretty (在查詢中): string

    pretty

響應

200 (ReplicationController): 正常

201 (ReplicationController): 已建立

401: 未授權

delete 刪除一個 ReplicationController

HTTP 請求

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

引數

響應

200 (Status): OK

202 (Status): 已接受

401: 未授權

deletecollection 刪除 ReplicationController 集合

HTTP 請求

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

引數

響應

200 (Status): OK

401: 未授權

本頁面是自動生成的。

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

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