Lease
apiVersion: coordination.k8s.io/v1
import "k8s.io/api/coordination/v1"
Lease
Lease 定义了租约概念。
apiVersion: coordination.k8s.io/v1
kind: Lease
metadata (ObjectMeta)
更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (LeaseSpec)
spec 包含 Lease 的规范。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
LeaseSpec
LeaseSpec 是 Lease 的规范。
acquireTime (MicroTime)
acquireTime 是当前租约获得的时间。
holderIdentity (string)
holderIdentity 包含当前租约持有者的身份。
leaseDurationSeconds (int32)
leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。这是针对上次观察到的 renewTime 进行测量的。
leaseTransitions (int32)
leaseTransitions 是租约在持有者之间转换的次数。
renewTime (MicroTime)
renewTime 是租约的当前持有者上次更新租约的时间。
LeaseList
LeaseList 是 Lease 对象的列表。
apiVersion: coordination.k8s.io/v1
kind: LeaseList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]Lease), required
items 是架构对象的列表。
操作
get
读取指定的 Lease
HTTP 请求
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
name (在路径中): string, required
Lease 的名称
namespace (在路径中): string, required
pretty (在查询中): string
响应
200 (Lease): OK
401: Unauthorized
list
列出或观察 Lease 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
namespace (在路径中): string, required
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (LeaseList): OK
401: Unauthorized
list
列出或观察 Lease 类型的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1/leases
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (LeaseList): OK
401: Unauthorized
create
创建 Lease
HTTP 请求
POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
namespace (在路径中): string, required
body: Lease, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Lease): OK
201 (Lease): Created
202 (Lease): Accepted
401: Unauthorized
update
替换指定的 Lease
HTTP 请求
PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
name (在路径中): string, required
Lease 的名称
namespace (在路径中): string, required
body: Lease, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Lease): OK
201 (Lease): Created
401: Unauthorized
patch
部分更新指定的 Lease
HTTP 请求
PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
name (在路径中): string, required
Lease 的名称
namespace (在路径中): string, required
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (Lease): OK
201 (Lease): Created
401: Unauthorized
delete
删除 Lease
HTTP 请求
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
name (在路径中): string, required
Lease 的名称
namespace (在路径中): string, required
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 Lease 集合
HTTP 请求
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
namespace (在路径中): string, required
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: Unauthorized
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他地方进行。