副本集
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
副本集
ReplicaSet 確保在任何給定時間都有指定數量的 Pod 副本正在執行。
apiVersion: apps/v1
kind: ReplicaSet
metadata (ObjectMeta)
如果 ReplicaSet 的標籤為空,則預設為與 ReplicaSet 管理的 Pod 相同。標準物件的元資料。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (ReplicaSetSpec)
Spec 定義了 ReplicaSet 期望行為的規範。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (ReplicaSetStatus)
Status 是最近觀察到的 ReplicaSet 狀態。此資料可能在某個時間窗內過時。由系統填充。只讀。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
ReplicaSetSpec
ReplicaSetSpec 是 ReplicaSet 的規範。
selector (LabelSelector),必填
Selector 是一個對 Pods 的標籤查詢,它應該與副本計數匹配。標籤的鍵和值必須匹配才能由此副本集控制。它必須與 Pod 模板的標籤匹配。更多資訊: https://kubernetes.club.tw/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec)
Template 是一個物件,用於描述在檢測到副本不足時將建立的 Pod。更多資訊: https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicaset/#pod-template
replicas (int32)
Replicas 是所需的 Pod 數量。這是一個指標,用於區分顯式零和未指定。預設為 1。更多資訊: https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicaset
minReadySeconds (int32)
一個新建立的 Pod 在其任何容器未崩潰的情況下被視為可用的最小就緒秒數。預設為 0(Pod 一旦就緒即被視為可用)。
ReplicaSetStatus
ReplicaSetStatus 表示 ReplicaSet 的當前狀態。
replicas (int32),必填
Replicas 是最近觀察到的非終止 Pod 的數量。更多資訊: https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicaset
availableReplicas (int32)
此副本集中可用的非終止 Pod 數量(至少就緒 minReadySeconds)。
readyReplicas (int32)
此 ReplicaSet 所針對的具有 Ready Condition 的非終止 Pod 數量。
terminatingReplicas (int32)
此副本集中正在終止的 Pod 數量。正在終止的 Pod 具有非空的 .metadata.deletionTimestamp 並且尚未達到 Failed 或 Succeeded .status.phase。
這是一個 Alpha 欄位。啟用 DeploymentReplicaSetTerminatingReplicas 才能使用此欄位。
fullyLabeledReplicas (int32)
具有與副本集 Pod 模板標籤匹配的標籤的非終止 Pod 數量。
conditions ([]ReplicaSetCondition)
補丁策略:按鍵
type
合併對映:合併時將保留鍵型別上的唯一值
表示副本集當前狀態的最新可用觀察結果。
ReplicaSetCondition 描述了副本集在某個時刻的狀態。
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 反映了最近觀察到的 ReplicaSet 的生成。
ReplicaSetList
ReplicaSetList 是 ReplicaSets 的集合。
apiVersion: apps/v1
kind: ReplicaSetList
metadata (ListMeta)
標準列表元資料。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ReplicaSet),必填
ReplicaSets 列表。更多資訊: https://kubernetes.club.tw/docs/concepts/workloads/controllers/replicaset
操作
get
讀取指定的 ReplicaSet
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
引數
響應
200 (ReplicaSet): OK
401: 未授權
get
讀取指定 ReplicaSet 的狀態
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
引數
響應
200 (ReplicaSet): OK
401: 未授權
list
列出或監視 ReplicaSet 型別的物件
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets
引數
namespace (在路徑中): string,必填
allowWatchBookmarks (查詢引數): boolean
continue (查詢引數): string
fieldSelector (查詢引數): string
labelSelector (查詢引數): string
limit (查詢引數): integer
pretty (在查詢中): string
resourceVersion (查詢引數): string
resourceVersionMatch (查詢引數): string
sendInitialEvents (查詢引數): boolean
timeoutSeconds (查詢引數): integer
watch (查詢引數): boolean
響應
200 (ReplicaSetList): OK
401: 未授權
list
列出或監視 ReplicaSet 型別的物件
HTTP 請求
GET /apis/apps/v1/replicasets
引數
allowWatchBookmarks (查詢引數): boolean
continue (查詢引數): string
fieldSelector (查詢引數): string
labelSelector (查詢引數): string
limit (查詢引數): integer
pretty (在查詢中): string
resourceVersion (查詢引數): string
resourceVersionMatch (查詢引數): string
sendInitialEvents (查詢引數): boolean
timeoutSeconds (查詢引數): integer
watch (查詢引數): boolean
響應
200 (ReplicaSetList): OK
401: 未授權
create
建立一個 ReplicaSet
HTTP 請求
POST /apis/apps/v1/namespaces/{namespace}/replicasets
引數
namespace (在路徑中): string,必填
body: ReplicaSet,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ReplicaSet): OK
201 (ReplicaSet): 建立成功
202 (ReplicaSet): 已接受
401: 未授權
update
替換指定的 ReplicaSet
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
引數
name (在路徑中): string,必填
ReplicaSet 的名稱
namespace (在路徑中): string,必填
body: ReplicaSet,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ReplicaSet): OK
201 (ReplicaSet): 建立成功
401: 未授權
update
替換指定 ReplicaSet 的狀態
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
引數
name (在路徑中): string,必填
ReplicaSet 的名稱
namespace (在路徑中): string,必填
body: ReplicaSet,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ReplicaSet): OK
201 (ReplicaSet): 建立成功
401: 未授權
patch
部分更新指定的 ReplicaSet
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
引數
name (在路徑中): string,必填
ReplicaSet 的名稱
namespace (在路徑中): string,必填
body: Patch,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (查詢引數): boolean
pretty (在查詢中): string
響應
200 (ReplicaSet): OK
201 (ReplicaSet): 建立成功
401: 未授權
patch
部分更新指定 ReplicaSet 的狀態
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
引數
name (在路徑中): string,必填
ReplicaSet 的名稱
namespace (在路徑中): string,必填
body: Patch,必填
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (查詢引數): boolean
pretty (在查詢中): string
響應
200 (ReplicaSet): OK
201 (ReplicaSet): 建立成功
401: 未授權
delete
刪除一個 ReplicaSet
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
引數
name (在路徑中): string,必填
ReplicaSet 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (查詢引數): integer
ignoreStoreReadErrorWithClusterBreakingPotential (查詢引數): boolean
pretty (在查詢中): string
propagationPolicy (查詢引數): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 ReplicaSet 集合
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/replicasets
引數
namespace (在路徑中): string,必填
body: DeleteOptions
continue (查詢引數): string
dryRun (在查詢中): string
fieldSelector (查詢引數): string
gracePeriodSeconds (查詢引數): integer
ignoreStoreReadErrorWithClusterBreakingPotential (查詢引數): boolean
labelSelector (查詢引數): string
limit (查詢引數): integer
pretty (在查詢中): string
propagationPolicy (查詢引數): string
resourceVersion (查詢引數): string
resourceVersionMatch (查詢引數): string
sendInitialEvents (查詢引數): boolean
timeoutSeconds (查詢引數): integer
響應
200 (Status): OK
401: 未授權
本頁面是自動生成的。
如果你打算報告此頁面存在的問題,請在問題描述中提及此頁面是自動生成的。修復可能需要在 Kubernetes 專案的其他地方進行。