副本控制器
apiVersion: v1
import "k8s.io/api/core/v1"
副本控制器
ReplicationController 表示副本控制器的配置。
apiVersion: v1
kind: ReplicationController
metadata (ObjectMeta)
如果 ReplicationController 的 Labels 为空,则默认为与该副本控制器所管理的 Pod 的标签相同。标准对象的 metadata。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (ReplicationControllerSpec)
Spec 定义了副本控制器期望行为的规范。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
status (ReplicationControllerStatus)
Status 是最近观察到的副本控制器的状态。此数据可能存在一定的时效性偏差。由系统填充。只读。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
ReplicationControllerSpec
ReplicationControllerSpec 是副本控制器的规范。
selector (map[string]string)
Selector 是 Pod 上的标签查询,应匹配 Replicas 数量。如果 Selector 为空,则默认为 Pod 模板上存在的标签。为了由该副本控制器控制,必须匹配的标签键值对;如果为空,则默认为 Pod 模板上的标签。更多信息:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/labels/#label-selectors
template (PodTemplateSpec)
Template 是描述当检测到副本不足时将创建的 Pod 的对象。此字段优先于 TemplateRef。唯一允许的 template.spec.restartPolicy 值为 "Always"。更多信息: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 应该处于 Ready 状态且其任何容器没有崩溃的最小秒数,以便被视为可用。默认为 0(Pod 一旦 Ready 即被视为可用)
ReplicationControllerStatus
ReplicationControllerStatus 表示副本控制器的当前状态。
replicas (int32),必需
Replicas 是最近观察到的副本数量。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
availableReplicas (int32)
此副本控制器中可用的副本(已就绪至少 minReadySeconds)数量。
readyReplicas (int32)
此副本控制器中已就绪的副本数量。
fullyLabeledReplicas (int32)
标签与副本控制器 Pod 模板标签相匹配的 Pod 数量。
conditions ([]ReplicationControllerCondition)
Patch 策略:按键
type
合并Map:合并期间将保留键 type 上的唯一值
表示关于副本控制器当前状态的最新可用观察值。
ReplicationControllerCondition 描述了副本控制器在特定时间点的状态。
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 反映了最近观察到的副本控制器的 Generation。
ReplicationControllerList
ReplicationControllerList 是副本控制器的集合。
apiVersion: v1
kind: ReplicationControllerList
metadata (ListMeta)
标准列表 metadata。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]ReplicationController),必需
副本控制器列表。更多信息:https://kubernetes.ac.cn/docs/concepts/workloads/controllers/replicationcontroller
操作
get
读取指定的 ReplicationController
HTTP 请求
GET /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
401: 未授权
get
读取指定 ReplicationController 的状态
HTTP 请求
GET /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
401: 未授权
list
列出或监视类型为 ReplicationController 的对象
HTTP 请求
GET /api/v1/namespaces/{namespace}/replicationcontrollers
参数
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 (ReplicationControllerList):正常
401: 未授权
list
列出或监视类型为 ReplicationController 的对象
HTTP 请求
GET /api/v1/replicationcontrollers
参数
allowWatchBookmarks (在查询参数中):boolean
continue (在查询参数中):string
fieldSelector (在查询参数中):string
labelSelector (在查询参数中):string
limit (在查询参数中):integer
pretty (在查询参数中):string
resourceVersion (在查询参数中):string
resourceVersionMatch (在查询参数中):string
sendInitialEvents (在查询参数中):boolean
timeoutSeconds (在查询参数中):integer
watch (在查询参数中):boolean
响应
200 (ReplicationControllerList):正常
401: 未授权
create
创建 ReplicationController
HTTP 请求
POST /api/v1/namespaces/{namespace}/replicationcontrollers
参数
namespace (在路径中):string,必需
body: ReplicationController,必需
dryRun (在查询参数中):string
fieldManager (在查询参数中):string
fieldValidation (在查询参数中):string
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
201 (ReplicationController):已创建
202 (ReplicationController):已接受
401: 未授权
update
替换指定的 ReplicationController
HTTP 请求
PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
body: ReplicationController,必需
dryRun (在查询参数中):string
fieldManager (在查询参数中):string
fieldValidation (在查询参数中):string
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
201 (ReplicationController):已创建
401: 未授权
update
替换指定 ReplicationController 的状态
HTTP 请求
PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
body: ReplicationController,必需
dryRun (在查询参数中):string
fieldManager (在查询参数中):string
fieldValidation (在查询参数中):string
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
201 (ReplicationController):已创建
401: 未授权
patch
部分更新指定的 ReplicationController
HTTP 请求
PATCH /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
body: Patch,必需
dryRun (在查询参数中):string
fieldManager (在查询参数中):string
fieldValidation (在查询参数中):string
force (在查询参数中):boolean
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
201 (ReplicationController):已创建
401: 未授权
patch
部分更新指定 ReplicationController 的状态
HTTP 请求
PATCH /api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
body: Patch,必需
dryRun (在查询参数中):string
fieldManager (在查询参数中):string
fieldValidation (在查询参数中):string
force (在查询参数中):boolean
pretty (在查询参数中):string
响应
200 (ReplicationController):正常
201 (ReplicationController):已创建
401: 未授权
delete
删除 ReplicationController
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/replicationcontrollers/{name}
参数
name (在路径中):string,必需
ReplicationController 的名称
namespace (在路径中):string,必需
body: DeleteOptions
dryRun (在查询参数中):string
gracePeriodSeconds (在查询参数中):integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询参数中):boolean
pretty (在查询参数中):string
propagationPolicy (在查询参数中):string
响应
200 (Status):正常
202 (Status):已接受
401: 未授权
deletecollection
删除 ReplicationController 的集合
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/replicationcontrollers
参数
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):正常
401: 未授权
此页面是自动生成的。
如果您打算报告此页面的问题,请在问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。