ReplicaSet
apiVersion: apps/v1
import "k8s.io/api/apps/v1"
ReplicaSet
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 是 Pod 的標籤查詢,應符合副本計數。 必須符合才能由此副本集控制的標籤鍵與值。 它必須符合 Pod 範本的標籤。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec)
Template 是描述 Pod 的物件,如果偵測到副本不足,將會建立該 Pod。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/workloads/controllers/replicationcontroller#pod-template
replicas (int32)
Replicas 是所需副本的數量。 這是一個指標,用於區分明確的零與未指定的狀況。 預設值為 1。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
minReadySeconds (int32)
新建立的 Pod 應處於就緒狀態而不會發生任何容器崩潰的最短秒數,才會被視為可用。 預設值為 0(Pod 一旦就緒就會被視為可用)
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 的集合。
apiVersion: apps/v1
kind: ReplicaSetList
metadata (ListMeta)
標準列表 metadata。 更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ReplicaSet), 必填
ReplicaSet 列表。 更多資訊:https://kubernetes.dev.org.tw/docs/concepts/workloads/controllers/replicationcontroller
操作
get
讀取指定的 ReplicaSet
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
參數
回應
200 (ReplicaSet): 成功
401: 未經授權
get
讀取指定 ReplicaSet 的狀態
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
參數
回應
200 (ReplicaSet): 成功
401: 未經授權
list
列出或監看 ReplicaSet 類型的物件
HTTP 請求
GET /apis/apps/v1/namespaces/{namespace}/replicasets
參數
namespace (在路徑中): 字串, 必填
allowWatchBookmarks (在查詢中): 布林值
continue (在查詢中): 字串
fieldSelector (在查詢中): 字串
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
watch (在查詢中): 布林值
回應
200 (ReplicaSetList): 成功
401: 未經授權
list
列出或監看 ReplicaSet 類型的物件
HTTP 請求
GET /apis/apps/v1/replicasets
參數
allowWatchBookmarks (在查詢中): 布林值
continue (在查詢中): 字串
fieldSelector (在查詢中): 字串
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
watch (在查詢中): 布林值
回應
200 (ReplicaSetList): 成功
401: 未經授權
create
建立 ReplicaSet
HTTP 請求
POST /apis/apps/v1/namespaces/{namespace}/replicasets
參數
namespace (在路徑中): 字串, 必填
body: ReplicaSet, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (ReplicaSet): 成功
201 (ReplicaSet): 已建立
202 (ReplicaSet): 已接受
401: 未經授權
update
取代指定的 ReplicaSet
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
參數
name (在路徑中): 字串, 必填
ReplicaSet 的名稱
namespace (在路徑中): 字串, 必填
body: ReplicaSet, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (ReplicaSet): 成功
201 (ReplicaSet): 已建立
401: 未經授權
update
取代指定 ReplicaSet 的狀態
HTTP 請求
PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
參數
name (在路徑中): 字串, 必填
ReplicaSet 的名稱
namespace (在路徑中): 字串, 必填
body: ReplicaSet, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
pretty (在查詢中): 字串
回應
200 (ReplicaSet): 成功
201 (ReplicaSet): 已建立
401: 未經授權
patch
部分更新指定的 ReplicaSet
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
參數
name (在路徑中): 字串, 必填
ReplicaSet 的名稱
namespace (在路徑中): 字串, 必填
body: Patch, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
force (在查詢中): 布林值
pretty (在查詢中): 字串
回應
200 (ReplicaSet): 成功
201 (ReplicaSet): 已建立
401: 未經授權
patch
部分更新指定 ReplicaSet 的狀態
HTTP 請求
PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status
參數
name (在路徑中): 字串, 必填
ReplicaSet 的名稱
namespace (在路徑中): 字串, 必填
body: Patch, 必填
dryRun (在查詢中): 字串
fieldManager (在查詢中): 字串
fieldValidation (在查詢中): 字串
force (在查詢中): 布林值
pretty (在查詢中): 字串
回應
200 (ReplicaSet): 成功
201 (ReplicaSet): 已建立
401: 未經授權
delete
刪除 ReplicaSet
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/replicasets/{name}
參數
name (在路徑中): 字串, 必填
ReplicaSet 的名稱
namespace (在路徑中): 字串, 必填
body: DeleteOptions
dryRun (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
回應
200 (Status): 成功
202 (Status): 已接受
401: 未經授權
deletecollection
刪除 ReplicaSet 集合
HTTP 請求
DELETE /apis/apps/v1/namespaces/{namespace}/replicasets
參數
namespace (在路徑中): 字串, 必填
body: DeleteOptions
continue (在查詢中): 字串
dryRun (在查詢中): 字串
fieldSelector (在查詢中): 字串
gracePeriodSeconds (在查詢中): 整數
labelSelector (在查詢中): 字串
limit (在查詢中): 整數
pretty (在查詢中): 字串
propagationPolicy (在查詢中): 字串
resourceVersion (在查詢中): 字串
resourceVersionMatch (在查詢中): 字串
sendInitialEvents (在查詢中): 布林值
timeoutSeconds (在查詢中): 整數
回應
200 (Status): 成功
401: 未經授權
此頁面為自動產生。
如果您計劃回報此頁面的問題,請在您的問題描述中提及此頁面為自動產生。 修正可能需要在 Kubernetes 專案的其他地方進行。