ReplicaSet

ReplicaSet 確保在任何給定時間運作指定數量的 Pod 副本。

apiVersion: apps/v1

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

ReplicaSet

ReplicaSet 確保在任何給定時間運作指定數量的 Pod 副本。


ReplicaSetSpec

ReplicaSetSpec 是 ReplicaSet 的規範。


ReplicaSetStatus

ReplicaSetStatus 代表 ReplicaSet 的目前狀態。


  • replicas (int32), 必要

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

  • availableReplicas (int32)

    此副本集的可用副本數(已就緒至少 minReadySeconds)。

  • readyReplicas (int32)

    readyReplicas 是以此 ReplicaSet 為目標且處於就緒條件的 Pod 數量。

  • fullyLabeledReplicas (int32)

    具有符合副本集 Pod 範本標籤的 Pod 數量。

  • conditions ([]ReplicaSetCondition)

    Patch 策略:在鍵 type 上合併

    Map:在合併期間,鍵類型上的唯一值將被保留

    代表副本集目前狀態的最新可用觀察結果。

    ReplicaSetCondition 描述副本集在特定時間點的狀態。

    • conditions.status (string), 必要

      條件的狀態,True、False、Unknown 其中之一。

    • conditions.type (string), 必要

      副本集條件的類型。

    • conditions.lastTransitionTime (Time)

      條件上次從一個狀態轉換到另一個狀態的時間。

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

    • conditions.message (string)

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

    • conditions.reason (string)

      條件上次轉換的原因。

  • observedGeneration (int64)

    ObservedGeneration 反映最近觀察到的 ReplicaSet 的世代。

ReplicaSetList

ReplicaSetList 是 ReplicaSet 的集合。


操作


get 讀取指定的 ReplicaSet

HTTP 請求

GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

參數

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

    ReplicaSet 的名稱

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

    命名空間

  • pretty (在查詢中): 字串

    pretty

回應

200 (ReplicaSet): 成功

401: 未經授權

get 讀取指定 ReplicaSet 的狀態

HTTP 請求

GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

參數

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

    ReplicaSet 的名稱

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

    命名空間

  • pretty (在查詢中): 字串

    pretty

回應

200 (ReplicaSet): 成功

401: 未經授權

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

HTTP 請求

GET /apis/apps/v1/namespaces/{namespace}/replicasets

參數

回應

200 (ReplicaSetList): 成功

401: 未經授權

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

HTTP 請求

GET /apis/apps/v1/replicasets

參數

回應

200 (ReplicaSetList): 成功

401: 未經授權

create 建立 ReplicaSet

HTTP 請求

POST /apis/apps/v1/namespaces/{namespace}/replicasets

參數

回應

200 (ReplicaSet): 成功

201 (ReplicaSet): 已建立

202 (ReplicaSet): 已接受

401: 未經授權

update 取代指定的 ReplicaSet

HTTP 請求

PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

參數

回應

200 (ReplicaSet): 成功

201 (ReplicaSet): 已建立

401: 未經授權

update 取代指定 ReplicaSet 的狀態

HTTP 請求

PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

參數

回應

200 (ReplicaSet): 成功

201 (ReplicaSet): 已建立

401: 未經授權

patch 部分更新指定的 ReplicaSet

HTTP 請求

PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

參數

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

    ReplicaSet 的名稱

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

    命名空間

  • body: Patch, 必填

  • dryRun (在查詢中): 字串

    dryRun

  • fieldManager (在查詢中): 字串

    fieldManager

  • fieldValidation (在查詢中): 字串

    fieldValidation

  • force (在查詢中): 布林值

    force

  • pretty (在查詢中): 字串

    pretty

回應

200 (ReplicaSet): 成功

201 (ReplicaSet): 已建立

401: 未經授權

patch 部分更新指定 ReplicaSet 的狀態

HTTP 請求

PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

參數

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

    ReplicaSet 的名稱

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

    命名空間

  • body: Patch, 必填

  • dryRun (在查詢中): 字串

    dryRun

  • fieldManager (在查詢中): 字串

    fieldManager

  • fieldValidation (在查詢中): 字串

    fieldValidation

  • force (在查詢中): 布林值

    force

  • pretty (在查詢中): 字串

    pretty

回應

200 (ReplicaSet): 成功

201 (ReplicaSet): 已建立

401: 未經授權

delete 刪除 ReplicaSet

HTTP 請求

DELETE /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

參數

回應

200 (Status): 成功

202 (Status): 已接受

401: 未經授權

deletecollection 刪除 ReplicaSet 集合

HTTP 請求

DELETE /apis/apps/v1/namespaces/{namespace}/replicasets

參數

回應

200 (Status): 成功

401: 未經授權

此頁面為自動產生。

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

上次修改時間:2024 年 8 月 28 日下午 6:01 PST:Update generated API reference for v1.31 (8ba98c79c1)