Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)

like image 409
Ivan Aracki Avatar asked Jan 09 '20 08:01

Ivan Aracki


People also ask

What is Kubernetes namespace for?

Namespaces are a way to organize clusters into virtual sub-clusters — they can be helpful when different teams or projects share a Kubernetes cluster.

What is Lease in Kubernetes?

This module is an implementation of an Akka Coordination Lease backed by a Custom Resource Definition (CRD) in Kubernetes. Resources in Kubernetes offer concurrency control and consistency that have been used to build a distributed lease/lock. A lease can be used for: Split Brain Resolver.

What happens when you delete namespace in Kubernetes?

Force Delete a Kubernetes Namespace. Sometimes a user deletes a namespace before all its resources have been removed. This action may cause the namespace to become permanently stuck in the Terminating status. Kubernetes does not allow creating another namespace with the same name until the deletion process is finished.


Video Answer


1 Answers

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

like image 159
Suresh Vishnoi Avatar answered Sep 30 '22 23:09

Suresh Vishnoi