LeaseCandidate v1beta1
apiVersion: coordination.k8s.io/v1beta1
import "k8s.io/api/coordination/v1beta1"
LeaseCandidate
LeaseCandidate 定义 Lease 对象的候选者。候选者被创建,以便协调的领导者选举能够从候选者列表中选择最佳领导者。
apiVersion: coordination.k8s.io/v1beta1
kind: LeaseCandidate
metadata (ObjectMeta)
更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (LeaseCandidateSpec)
spec 包含 Lease 的规范。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
LeaseCandidateSpec
LeaseCandidateSpec 是 Lease 的规范。
binaryVersion (string), required
BinaryVersion 是二进制版本。它必须采用语义化版本格式,不带前导
v。此字段是必需的。leaseName (string), required
LeaseName 是此候选者正在竞争的 Lease 的名称。此字段上的限制与 Lease.name 上的限制相同。多个 Lease 候选者可以引用相同的 Lease.name。此字段是不可变的。
strategy (string), required
Strategy 是协调的领导者选举将用于选择领导者的策略。如果相同 Lease 的多个候选者返回不同的策略,则由 BinaryVersion 最新的候选者提供的策略将被使用。如果仍然存在冲突,这是一个用户错误,协调的领导者选举将不会操作 Lease,直到解决为止。
emulationVersion (string)
EmulationVersion 是模拟版本。它必须采用语义化版本格式,不带前导
v。当策略为 "OldestEmulationVersion" 时,EmulationVersion 必须小于或等于 BinaryVersion。此字段是必需的pingTime (MicroTime)
PingTime 是服务器上次请求 LeaseCandidate 续订的时间。它仅在领导者选举期间完成,以检查是否有 LeaseCandidate 变得不合格。当 PingTime 更新时,LeaseCandidate 将通过更新 RenewTime 来响应。
renewTime (MicroTime)
RenewTime 是上次更新 LeaseCandidate 的时间。每当 Lease 需要进行领导者选举时,PingTime 字段都会更新,以向 LeaseCandidate 发出信号,他们应该更新 RenewTime。如果距离上次续订已经过去数小时,旧的 LeaseCandidate 对象也会被垃圾回收。PingTime 字段会定期更新,以防止仍然活跃的 LeaseCandidate 被垃圾回收。
LeaseCandidateList
LeaseCandidateList 是 Lease 对象的列表。
apiVersion: coordination.k8s.io/v1beta1
kind: LeaseCandidateList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]LeaseCandidate), required
items 是一个模式对象列表。
操作
get 读取指定的 LeaseCandidate
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
Parameters
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
pretty (在查询中): string
响应
200 (LeaseCandidate): OK
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
Parameters
namespace (在路径中): string, 必需
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
响应
200 (LeaseCandidateList): OK
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/leasecandidates
Parameters
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
响应
200 (LeaseCandidateList): OK
401: 未授权
create 创建 LeaseCandidate
HTTP 请求
POST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
Parameters
namespace (在路径中): string, 必需
body: LeaseCandidate, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
202 (LeaseCandidate): Accepted
401: 未授权
update 替换指定的 LeaseCandidate
HTTP 请求
PUT /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
Parameters
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: LeaseCandidate, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
401: 未授权
patch 部分更新指定的 LeaseCandidate
HTTP 请求
PATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
Parameters
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
401: 未授权
delete 删除 LeaseCandidate
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
Parameters
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
pretty (在查询中): string
propagationPolicy (in query): string
响应
200 (Status): 确定
202 (Status): 已接受
401: 未授权
deletecollection 删除 LeaseCandidate 集合
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
Parameters
namespace (在路径中): string, 必需
body: DeleteOptions
continue (in query): string
dryRun (在查询中): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
响应
200 (Status): 确定
401: 未授权
本页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。