14 KiB
		
	
	
	
	
	
			
		
		
	
	| api_metadata | content_type | description | title | weight | auto_generated | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
 | api_reference | Lease defines a lease concept. | Lease | 5 | true | 
apiVersion: coordination.k8s.io/v1
import "k8s.io/api/coordination/v1"
Lease
Lease defines a lease concept.
- 
apiVersion: coordination.k8s.io/v1 
- 
kind: Lease 
- 
metadata (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta) More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (<a href="{{< ref "../cluster-resources/lease-v1#LeaseSpec" >}}">LeaseSpec) spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
LeaseSpec
LeaseSpec is a specification of a Lease.
- 
acquireTime (MicroTime) acquireTime is a time when the current lease was acquired. MicroTime is version of Time with microsecond level precision. 
- 
holderIdentity (string) holderIdentity contains the identity of the holder of a current lease. 
- 
leaseDurationSeconds (int32) leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed renewTime. 
- 
leaseTransitions (int32) leaseTransitions is the number of transitions of a lease between holders. 
- 
renewTime (MicroTime) renewTime is a time when the current holder of a lease has last updated the lease. MicroTime is version of Time with microsecond level precision. 
LeaseList
LeaseList is a list of Lease objects.
- 
apiVersion: coordination.k8s.io/v1 
- 
kind: LeaseList 
- 
metadata (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta) Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease), required items is a list of schema objects. 
Operations
get read the specified Lease
HTTP Request
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
- 
name (in path): string, required name of the Lease 
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): OK
401: Unauthorized
list list or watch objects of kind Lease
HTTP Request
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
Parameters
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
allowWatchBookmarks (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks 
- 
continue (in query): string <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue 
- 
fieldSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector 
- 
labelSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector 
- 
limit (in query): integer <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
- 
resourceVersion (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion 
- 
resourceVersionMatch (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch 
- 
sendInitialEvents (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents 
- 
timeoutSeconds (in query): integer <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds 
- 
watch (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#LeaseList" >}}">LeaseList): OK
401: Unauthorized
list list or watch objects of kind Lease
HTTP Request
GET /apis/coordination.k8s.io/v1/leases
Parameters
- 
allowWatchBookmarks (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks 
- 
continue (in query): string <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue 
- 
fieldSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector 
- 
labelSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector 
- 
limit (in query): integer <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
- 
resourceVersion (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion 
- 
resourceVersionMatch (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch 
- 
sendInitialEvents (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents 
- 
timeoutSeconds (in query): integer <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds 
- 
watch (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#LeaseList" >}}">LeaseList): OK
401: Unauthorized
create create a Lease
HTTP Request
POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
Parameters
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
body: <a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease, required 
- 
dryRun (in query): string <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun 
- 
fieldManager (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager 
- 
fieldValidation (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): OK
201 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): Created
202 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): Accepted
401: Unauthorized
update replace the specified Lease
HTTP Request
PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
- 
name (in path): string, required name of the Lease 
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
body: <a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease, required 
- 
dryRun (in query): string <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun 
- 
fieldManager (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager 
- 
fieldValidation (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): OK
201 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): Created
401: Unauthorized
patch partially update the specified Lease
HTTP Request
PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
- 
name (in path): string, required name of the Lease 
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
body: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch, required 
- 
dryRun (in query): string <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun 
- 
fieldManager (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager 
- 
fieldValidation (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation 
- 
force (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#force" >}}">force 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
Response
200 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): OK
201 (<a href="{{< ref "../cluster-resources/lease-v1#Lease" >}}">Lease): Created
401: Unauthorized
delete delete a Lease
HTTP Request
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
- 
name (in path): string, required name of the Lease 
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions 
- 
dryRun (in query): string <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun 
- 
gracePeriodSeconds (in query): integer <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
- 
propagationPolicy (in query): string <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy 
Response
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): Accepted
401: Unauthorized
deletecollection delete collection of Lease
HTTP Request
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
Parameters
- 
namespace (in path): string, required <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace 
- 
body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions 
- 
continue (in query): string <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue 
- 
dryRun (in query): string <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun 
- 
fieldSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector 
- 
gracePeriodSeconds (in query): integer <a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds 
- 
labelSelector (in query): string <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector 
- 
limit (in query): integer <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit 
- 
pretty (in query): string <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty 
- 
propagationPolicy (in query): string <a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy 
- 
resourceVersion (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion 
- 
resourceVersionMatch (in query): string <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch 
- 
sendInitialEvents (in query): boolean <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents 
- 
timeoutSeconds (in query): integer <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds 
Response
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK
401: Unauthorized