Lease
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 (ObjectMeta)
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata -
spec (LeaseSpec)
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 (ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata -
items ([]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} (string), required
name of the Lease - {namespace} (string), required
namespace - ?pretty (string)
pretty
Response
200 (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} (string), required
namespace - ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (LeaseList): OK
401: Unauthorized
list
list or watch objects of kind Lease
HTTP Request
GET /apis/coordination.k8s.io/v1/leases
Parameters
- ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (LeaseList): OK
401: Unauthorized
create
create a Lease
HTTP Request
POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
Parameters
-
{namespace} (string), required
namespace -
body (Lease), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (Lease): OK
201 (Lease): Created
202 (Lease): Accepted
401: Unauthorized
update
replace the specified Lease
HTTP Request
PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
-
{name} (string), required
name of the Lease -
{namespace} (string), required
namespace -
body (Lease), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (Lease): OK
201 (Lease): Created
401: Unauthorized
patch
partially update the specified Lease
HTTP Request
PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
-
{name} (string), required
name of the Lease -
{namespace} (string), required
namespace -
body (Patch), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?force (boolean)
force -
?pretty (string)
pretty
Response
200 (Lease): OK
401: Unauthorized
delete
delete a Lease
HTTP Request
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
Parameters
-
{name} (string), required
name of the Lease -
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?dryRun (string)
dryRun -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of Lease
HTTP Request
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
Parameters
-
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?continue (string)
continue -
?dryRun (string)
dryRun -
?fieldSelector (string)
fieldSelector -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?labelSelector (string)
labelSelector -
?limit (integer)
limit -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy -
?resourceVersion (string)
resourceVersion -
?resourceVersionMatch (string)
resourceVersionMatch -
?timeoutSeconds (integer)
timeoutSeconds
Response
200 (Status): OK
401: Unauthorized