Kubelet: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 21: Line 21:
The kubelet performs [[Kubernetes_Container_Image_Pull_Concepts#Overview|image pulling]] on behalf of the pods scheduled on the node.
The kubelet performs [[Kubernetes_Container_Image_Pull_Concepts#Overview|image pulling]] on behalf of the pods scheduled on the node.
=Metrics Collection=
=Metrics Collection=
The kubelet translates each pod into its constituent containers and fetches individual container usage statistics from the container runtime through the [[Kubernetes_Container_Runtime_Concepts#Container_Runtime_Interface_.28CRI.29|Container Runtime Interface]].

Revision as of 23:28, 5 October 2020

External

Internal

Overview

Each node runs an agent called kubelet, which is responsible with the node's registration with the cluster. Once a node is registered, its CPU, RAM and storage are pooled into the wider cluster pools of corresponding resources.

The kubelet acts as a bridge between the Kubernetes master and the nodes, managing the pods and containers running on a machine.

The kubelet is watching the API server for work (pod) assignments and attempts to run them. If it is not successful for any reason, it reports the condition back to the API server. The task of actually running the pods is delegated to the local container runtime.

The kubelet maintains a cache, participates in image pulling and takes part in resource metrics collection.

Cache

The kubelet has a cache it uses to serve various values to the node. For example, the secrets projected as files in pods running on the node are fed from this cache. The type of the cache is configurable. The cached values can be propagated via watch (default), ttl-based or simply redirecting all requests to the API server.

Image Pulling

The kubelet performs image pulling on behalf of the pods scheduled on the node.

Metrics Collection

The kubelet translates each pod into its constituent containers and fetches individual container usage statistics from the container runtime through the Container Runtime Interface.