副本集
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 是对应该匹配副本数量的 Pod 的标签查询。为了被此副本集控制,必须匹配的标签键和值。它必须与 Pod 模板的标签匹配。更多信息:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec)
Template 是描述如果检测到不足的副本将创建的 Pod 的对象。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller#pod-template
replicas (int32)
Replicas 是期望副本的数量。这是一个指针,用于区分显式零和未指定。默认为 1。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
minReadySeconds (int32)
新创建的 Pod 应该处于就绪状态(没有其任何容器崩溃)的最短秒数,才能被认为可用。默认为 0(Pod 一旦处于就绪状态,就会被认为可用)。
ReplicaSetStatus
ReplicaSetStatus 表示 ReplicaSet 的当前状态。
replicas (int32), 必填
Replicas 是最近观察到的副本数量。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
availableReplicas (int32)
此副本集可用的副本数量(至少就绪 minReadySeconds)。
readyReplicas (int32)
readyReplicas 是由此 ReplicaSet 针对的具有就绪条件的 Pod 数量。
fullyLabeledReplicas (int32)
具有与副本集 Pod 模板的标签匹配的标签的 Pod 数量。
conditions ([]ReplicaSetCondition)
补丁策略:按键
type
合并表示副本集当前状态的最新可用观察结果。
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)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ReplicaSet), 必填
ReplicaSet 列表。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller
操作
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
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
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未经授权
此页面是自动生成的。
如果您计划报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。