22

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
  • 4,861
  • 11
  • 59
  • 73

2 Answers2

20

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
  • 17,341
  • 8
  • 47
  • 55
  • 1
    Thanks for the answer :) One thing bothers me though. It says status is implemented, but PR is closed and it's not part of K8s yet? – Ivan Aracki Jan 09 '20 at 09:38
  • 1
    its stable in k8s 1.17 . before it was in beta phase – Suresh Vishnoi Jan 09 '20 at 09:42
  • 1
    node-heartbeat.md file no longer exists, last existed in https://github.com/kubernetes/enhancements/blob/0460fcf4637d440ce7d539a931e44dae931f9849/keps/sig-node/0009-node-heartbeat.md , moved/deleted in https://github.com/kubernetes/enhancements/commit/7eef794bb549a50c6b08c457556ff0eac98a4c6b – AlbinoDrought Nov 23 '21 at 20:17
  • 1
    A permalink to the (02/2022) version - https://github.com/kubernetes/enhancements/blob/761668f82fef6727d2cbee10e632c371dfded529/keps/sig-node/589-efficient-node-heartbeats/README.md – Gabi Davar Feb 14 '22 at 08:10
  • Thanks @GabiDavar I added a working link. – Suresh Vishnoi Feb 14 '22 at 09:33
2

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
  • 4,861
  • 11
  • 59
  • 73