Kubernetes Components
If you are new to Kubernetes, then I would suggest you go over “Kubernetes Overview And Container Benefits”
When we deploy Kubernetes, we will get a cluster along with components.
Here are the different components of Kubernetes:
Image Source From Kubernetes
Kubernetes cluster is a combination of Master (Control Plance) and Worker Nodes.
Master Node: Usually a Kubernetes control plane, even though control place services can run across multiple nodes but for simplicity, we keep them in the same node. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.
Worker Node: host the Pods that are the components of the application workload. The control plane manages the worker nodes and the Pods in the cluster.
What is the Kubernetes control plane and its Components?
The Control plane is the nerve center of the Kubernetes cluster, Here we have the Kubernetes components that control the cluster:
kube-apiserver
The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.
The main implementation of a Kubernetes API server is kube-apiserver. kube-apiserver is designed to scale horizontally—that is, it scales by deploying more instances. You can run several instances of kube-apiserver and balance traffic between those instances.
kube-scheduler
Control plane component that watches for newly created Pods with no assigned node, and selects a node for them to run on.
Factors taken into account for scheduling decisions include individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference, and deadlines.
kube-controller-manager
Control Plane component that runs controller processes.
Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.
These controllers include:
- Node controller: Responsible for noticing and responding when nodes go down.
- Replication controller: Responsible for maintaining the correct number of pods for every replication controller object in the system.
- Endpoints controller: Populates the Endpoints object (that is, joins Services & Pods).
- Service Account & Token controllers: Create default accounts and API access tokens for new namespaces.
etcd
Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data.
cloud-controller-manager
The cloud controller manager lets us link our cluster into the cloud provider’s API, and separates out the components that interact with that cloud platform from components that just interact with your cluster.
The cloud-controller-manager only runs controllers that are specific to our cloud provider. If we are running Kubernetes on our own premises, or in a learning environment inside our own PC, the cluster does not have a cloud controller manager.
As with the kube-controller-manager, the cloud-controller-manager combines several logically independent control loops into a single binary that we run as a single process. We can scale horizontally (run more than one copy) to improve performance or to help tolerate failures.
The following controllers can have cloud provider dependencies:
- Node controller: For checking the cloud provider to determine if a node has been deleted in the cloud after it stops responding
- Route controller: For setting up routes in the underlying cloud infrastructure
- Service controller: For creating, updating, and deleting cloud provider load balancers
What is the Kubernetes node and its Components?
Nodes
A Kubernetes cluster needs at least one compute node, but will normally have many. Pods are scheduled and orchestrated to run on nodes. When we need to scale up the capacity of our cluster? Then we just need to add more nodes as we need.
Pods
A pod is a smallest and simplest unit in the Kubernetes object model. It represents a single instance of an application. Each pod is made up of a container or a series of tightly coupled containers, along with options that govern how the containers are run. Pods can be connected to persistent storage in order to run stateful applications.
Container runtime engine
The container runtime is the software that is responsible for running containers.
Kubernetes supports several container runtimes like: Docker, rkt, containerd, CRI-O, and any implementation of the Kubernetes CRI (Container Runtime Interface).
kubelet
An agent that runs on each node in the cluster, a tiny application that communicates with the control plane. The kublet makes sure containers are running in a pod. When the control plane needs something to happen in a node, the kubelet executes the action.
kube-proxy
kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.
kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.
kube-proxy uses the operating system packet filtering layer if there is one and it’s available. Otherwise, kube-proxy forwards the traffic itself.
Do we have any Other Kubernetes cluster Components?
Yes, It depends on what kind of objectives we are planning as part of Kubernetes deployment like if we are planning for stateful pods then we need persistent storage, let’s look at a few additional components which will help on Kubernetes adoption.
Persistent storage
Beyond just managing the containers that run an application, Kubernetes can also manage the application data attached to a cluster. Kubernetes allows users to request storage resources without having to know the details of the underlying storage infrastructure. Persistent volumes are specific to a cluster, rather than a pod, and thus can outlive the life of a pod.
Container registry
The container images that Kubernetes relies on are stored in a container registry. This can be a registry you configure, or a third party registry.
Addons
DNS
While the other addons are not strictly required, all Kubernetes clusters should have cluster DNS, as many examples rely on it.
Cluster DNS is a DNS server, in addition to the other DNS server(s) in your environment, which serves DNS records for Kubernetes services.
Containers started by Kubernetes automatically include this DNS server in their DNS searches.
Dashboard
The dashboard is a general-purpose, web-based UI for Kubernetes clusters. It allows users to manage and troubleshoot applications running in the cluster, as well as the cluster itself.
There are other Addons Which might help as per our need
Good One ! Well Explained !