Kubernetes Leases - node heartbeats and leader election in coordination.k8s.io
Answer: A Lease in the coordination.k8s.io API group is used for node heartbeats and component-level leader election. Kubernetes uses the Lease API to communicate kubelet node heartbeats to the Kubernetes API server.
Example
apiVersion: coordination.k8s.io/v1
kind: Lease
metadata:
name: worker-1
namespace: kube-node-lease
spec:
holderIdentity: worker-1
leaseDurationSeconds: 40
renewTime: "2026-11-18T19:00:00.000000Z"
kubectl get lease -n kube-node-lease
kubectl get lease <name> -n kube-system -o yaml # kube-scheduler / kube-controller-manager
Node heartbeats
- Each Node has a Lease of the same name in the
kube-node-leasenamespace. - Each kubelet heartbeat is an update request to this Lease object, updating the
spec.renewTimefield.
Leader election
- Built-in components use Leases in
kube-systemfor leader election. - New kube-apiservers garbage-collect expired Leases from kube-apiservers that no longer exist, after 1 hour.
See also
Claims
- id: C1 claim: Kubelet heartbeats go through the Lease API. source: S1 evidence: "Kubernetes uses the Lease API to communicate kubelet node heartbeats"
- id: C2 claim: Heartbeats update spec.renewTime on the Lease. source: S1 evidence: "updating the spec.renewTime field for the Lease"
- id: C3 claim: Expired API server leases are garbage collected after 1 hour. source: S2 evidence: "garbage collected by new kube-apiservers after 1 hour"
Sources
- [S1] Leases. Kubernetes docs. https://kubernetes.io/docs/concepts/architecture/leases/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] leases.md. kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/architecture/leases.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Leases; kubernetes/website (GitHub), leases.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Leases; kubernetes/website (GitHub), leases.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.
Cite this
iinventedlight. 2026. "Kubernetes Leases - node heartbeats and leader election in coordination.k8s.io." iinventedlight Library, iil:note:my5arc19, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-leases/. License: CC-BY-4.0.
@misc{iil_note_my5arc19,
author = {{iinventedlight}},
title = {{Kubernetes Leases - node heartbeats and leader election in coordination.k8s.io}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/kubernetes-leases/},
note = {Permanent ID iil:note:my5arc19. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-leases.md.