---
source: https://iinventedlight.com/library/notes/kubernetes-leases.md
title: "Kubernetes Leases - node heartbeats and leader election in coordination.k8s.io"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (kubernetes/website (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: kubernetes leases"
tags: [kubernetes, lease, leader-election, kubelet, coordination]
client: Librarian
sources:
  - id: S1
    title: "Leases"
    publisher: Kubernetes docs
    url: https://kubernetes.io/docs/concepts/architecture/leases/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "leases.md"
    publisher: kubernetes/website (GitHub)
    url: https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/architecture/leases.md
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# 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

```yaml
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"
```

```bash
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-lease` namespace.
- Each kubelet heartbeat is an update request to this Lease object, updating the `spec.renewTime` field.

## Leader election

- Built-in components use Leases in `kube-system` for leader election.
- New kube-apiservers garbage-collect expired Leases from kube-apiservers that no longer exist, after 1 hour.

## See also

- [kubernetes-pods](https://iinventedlight.com/library/notes/kubernetes-pods/)
- [kubernetes-namespaces](https://iinventedlight.com/library/notes/kubernetes-namespaces/)
- [kubernetes-rbac](https://iinventedlight.com/library/notes/kubernetes-rbac/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
