K
Q

What is the "kube-node-lease" namespace for?

January 9, 2020

I know the purpose of other Kubernetes default namespaces such as:

kube-system
,
default
&
kube-public
, but there is no official document about the
kube-node-lease
.

The only official explanation I've found is:

Heartbeats, sent by Kubernetes nodes, help determine the availability of a node. There are two forms of heartbeats: updates of NodeStatus and the Lease object. Each Node has an associated Lease object in the kube-node-lease namespace.

With

kubectl get all -n kube-node-lease
I'm getting no resources at all. (k8s-version: 1.15)

-- Ivan Aracki
kubernetes
kubernetes-namespace

2 Answers

January 9, 2020

here is the Kubernetes Enhancement Proposal of node-heartbeat.md for this feature. It makes node heartbeats significantly cheaper from both scalability and performance perspective.

This introduce a new Lease built-in API in the newly created API group

coordination.k8s.io.
which makes it easily reusable for other purposes 3rd party device monitoring plugins that's why it is namespaced.

This feature become stable in k8s 1.17

-- Suresh Vishnoi
Source: StackOverflow

January 4, 2022

There is a new explanation in the official Kubernetes docs about Namespaces:

kube-node-lease
This namespace holds Lease objects associated with each node. Node leases allow the kubelet to send heartbeats so that the control plane can detect node failure.

-- Ivan Aracki
Source: StackOverflow