What is the "kube-node-lease" namespace for?
Asked Answered
D

2

25

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)

Dowse answered 9/1, 2020 at 8:36 Comment(0)
G
21

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

Guatemala answered 9/1, 2020 at 8:46 Comment(5)
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?Dowse
its stable in k8s 1.17 . before it was in beta phaseGuatemala
node-heartbeat.md file no longer exists, last existed in github.com/kubernetes/enhancements/blob/… , moved/deleted in github.com/kubernetes/enhancements/commit/…Eladiaelaeoptene
A permalink to the (02/2022) version - github.com/kubernetes/enhancements/blob/…Mcafee
Thanks @GabiDavar I added a working link.Guatemala
D
3

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.

Dowse answered 4/1, 2022 at 15:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.