副本集
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.ac.cn/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec)
Template 是一个对象,用于描述在检测到副本不足时将创建的 Pod。更多信息: https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicaset/#pod-template
replicas (int32)
Replicas 是所需的 Pod 数量。这是一个指针,用于区分显式零和未指定。默认为 1。更多信息: https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicaset
minReadySeconds (int32)
一个新创建的 Pod 在其任何容器未崩溃的情况下被视为可用的最小就绪秒数。默认为 0(Pod 一旦就绪即被视为可用)。
ReplicaSetStatus
ReplicaSetStatus 表示 ReplicaSet 的当前状态。
replicas (int32),必填
Replicas 是最近观察到的非终止 Pod 的数量。更多信息: https://kubernetes.ac.cn/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.ac.cn/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 项目的其他地方进行。