Kubelet: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 10: Line 10:


=Cache=
=Cache=
The kubelet has a cache it uses to serve various values to the node. For example, the [[Kubernetes_Cluster_Configuration_Concepts#Secrets_Projected_as_Files|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.
The kubelet has a cache it uses to serve various values to the node. For example, the [[Kubernetes_Cluster_Configuration_Concepts#Secrets_Projected_as_Files|secrets projected as files]] in pods running on the node are served 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=
=Image Pulling=

Revision as of 22:16, 23 September 2021

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 node, managing the pods and containers running on the machine it is installed on. 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, 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 served 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. Verify this, the container runtime says it does image pulling.

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. The kubelet also fetches this information from the integrated cAdvisor for the legacy Docker integration. cAdvisor runs in the host network namespace. Finally, the kubelet gathers node-level metrics. It then exposes the aggregated pod resource usage statistics to the metrics server, which in turn exposes these statistics via the Resource Metrics API. The API is served at /metrics/resource/v1beta1 on the kubelet's authenticated and read-only ports. kubelet also exposes metrics in /metrics/cadvisor and /metrics/probes.

Authentication/Authorization

https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/

API Access

https://www.deepnetwork.com/blog/kubernetes/2020/01/13/kubelet-api.html

Port: 10250

[Next]