apiVersion: coordination.k8s.io/v1beta1
import "k8s.io/api/coordination/v1beta1"
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 是 Lease 的规格。
binaryVersion (string),必需
BinaryVersion 是二进制版本。它必须是 semver 格式,且不带前缀 v。此字段为必需。
leaseName (string),必需
LeaseName 是此候选者正在争用的租赁(Lease)名称。此字段的限制与 Lease.name 相同。多个租赁候选者可以引用同一个 Lease.name。此字段是不可变的。
strategy (string),必需
Strategy 是协调领导者选举将用于挑选领导者的策略。如果同一个 Lease 的多个候选者返回不同的策略,则将使用具有最新 BinaryVersion 的候选者所提供的策略。如果仍然存在冲突,则视为用户错误,协调领导者选举将不会操作该 Lease,直到冲突解决。
emulationVersion (string)
EmulationVersion 是仿真版本。它必须是 semver 格式,且不带前缀 v。EmulationVersion 必须小于或等于 BinaryVersion。当策略为 "OldestEmulationVersion" 时,此字段为必需。
pingTime (MicroTime)
PingTime 是服务器最后一次请求 LeaseCandidate 进行续订的时间。这仅在领导者选举期间执行,以检查是否有任何 LeaseCandidate 变得不符合条件。当 PingTime 更新时,LeaseCandidate 将通过更新 RenewTime 来响应。
renewTime (MicroTime)
RenewTime 是 LeaseCandidate 最后一次更新的时间。每当 Lease 需要进行领导者选举时,就会更新 PingTime 字段,向 LeaseCandidate 发出信号,通知其应该更新 RenewTime。如果旧的 LeaseCandidate 对象距离上次续订已经过去了数小时,它们也会被垃圾回收。PingTime 字段会定期更新,以防止活跃的 LeaseCandidate 被垃圾回收。
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),必需
items 是一个模式对象列表。
get 读取指定的 LeaseCandidateGET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
pretty (在查询中): string
200 (LeaseCandidate): OK
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
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 类型的对象GET /apis/coordination.k8s.io/v1beta1/leasecandidates
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 创建一个 LeaseCandidatePOST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
namespace (在路径中): string, 必需
body: LeaseCandidate,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
200 (LeaseCandidate): OK
201 (LeaseCandidate): 已创建
202 (LeaseCandidate): 已接受
401: 未授权
update 替换指定的 LeaseCandidatePUT /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: LeaseCandidate,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
200 (LeaseCandidate): OK
201 (LeaseCandidate): 已创建
401: 未授权
patch 部分更新指定的 LeaseCandidatePATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
name (在路径中): string, 必需
LeaseCandidate 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
200 (LeaseCandidate): OK
201 (LeaseCandidate): 已创建
401: 未授权
delete 删除一个 LeaseCandidateDELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
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 集合DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
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 项目的其他地方进行。