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),必填
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
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 是 schema 对象的列表。
操作
get 读取指定的 LeaseCandidate
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
响应
200 (LeaseCandidate): OK
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
参数
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 (LeaseCandidateList): OK
401: 未授权
list 列出或监视 LeaseCandidate 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/leasecandidates
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (LeaseCandidateList): OK
401: 未授权
create 创建一个 LeaseCandidate
HTTP 请求
POST /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): Created (已创建)
202 (LeaseCandidate): Accepted (已接受)
401: 未授权
update 替换指定的 LeaseCandidate
HTTP 请求
PUT /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): Created (已创建)
401: 未授权
patch 部分更新指定的 LeaseCandidate
HTTP 请求
PATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
name (在路径中): string,必填
LeaseCandidate 的名称
namespace (在路径中): string,必填
body: Patch,必填
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created (已创建)
401: 未授权
delete 删除一个 LeaseCandidate
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
name (在路径中): string,必填
LeaseCandidate 的名称
namespace (在路径中): string,必填
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): Accepted (已接受)
401: 未授权
deletecollection 删除 LeaseCandidate 集合
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
参数
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 项目的其他地方进行。