Resources
Kubernets (sometimes called K8S) is an open-source platform to deploy and manage containerized workloads and services. When we develop Kubernets, we will get a cluster. This cluster consists of worker machines (nodes) that run the containerized application.
Every cluster will have at least one worker node. This node(s) host Pods that are the components of the application workload.
Kubernets components can be categorized into three main parts: control plane, node, and add-ons. These components comprise individual elements with different functionalities. Below is the illustrated instance of a cluster with its components.
The control plane's components are an element doing the global decision-making process and responding to cluster events. The control plane components can run on any machine in the cluster. In practice, set-up scripts are preferable to start all control plane components on the same machine due to their simplicity.
kube-apiserver is a component for API server designed to scale horizontally by deploying more instances. API server will runs as the front end for the Kubernetes control plane.
etcd is a lightweight, highly available key-value store accessible to each node in a Kubernetes cluster.
kube-scheduler watches newly created Pods with no assigned node, and selects a node for them to run on.
kube-controller-manager is a component that runs the controller process. This component comprises individual controllers that run separately but are compiled into a single process to reduce complexity. Some of these components are shown in the table below.
Components | Function |
---|---|
Node controller | Responsible for noticing and responding when nodes go down. |
Job controller | Watches for Job objects that represent one-off tasks, then creates Pods to run those tasks to completion. |
EndpointSlice controller | Populates EndpointSlice objects (to provide a link between Services and Pods). |
ServiceAccount controller | Create default ServiceAccounts for new namespaces. |
cloud-controller-manager is a Kubernetes control plane component that embeds cloud-specific control logic. This controller is consisted of individual components that merged into a single process. Some of these components are shown in the table below.
Column 1 | Column 2 |
---|---|
Node controller | Checking the cloud provider to determine if a node has been deleted in the cloud after it stops responding |
Route controller | Setting up routes in the underlying cloud infrastructure |
Service controller | Creating, updating and deleting cloud provider load balancers |
Node components run on every node, maintaining running pods and providing the Kubernetes runtime environment.
kubelet is an agent that runs on each node in the cluster. It makes sure that containers are running in a Pod with healthy mechanism. The Kubelet only manage containers created by Kubernets.
kube-proxy is a network proxy that runs on each node in a cluster, implementing part of the Kubernetes Service concept. kube-proxy maintains network rules on nodes that allow network communication to Pods from network sessions inside or outside of deployed cluster.
The container runtime is the software that is responsible for running containers. Kubernetes supports container runtimes such as containerd, CRI-O, and any other implementation of the Kubernetes CRI (Container Runtime Interface).
Addons use Kubernetes resources (DaemonSet, Deployment, etc) to implement cluster features. Below are mainly used components in add-ons.
Components | Function |
---|---|
Cluster DNS | Serves DNS records for Kubernetes services. |
Web UI (Dashboard) | Allows users to manage and troubleshoot applications running in the cluster |
Container resouce monitoring | Records generic time-series metrics about containers in a central database, and provides a UI for browsing the data. |
Cluster-level logging | Saving container logs to a central log store with search/browsing interface. |