Before Kubernetes, managing and scaling any containerized application was complicated and intense. Now, with the help of Kubernetes, it relieves us from all the tedious processes, such as deploying and scaling containerized applications. Kubernetes is among the many orchestration tools available for managing containerized applications. Orchestration tools help us review all the management tasks, including ensuring efficient resource utilization, high availability, and scalability while reducing the manual effort required to handle these tasks.
Now Kubernetes is the platform where these applications are orchestrated. It also makes the complexity easier through its capabilities, which are stated below:
Facilitated configuration and secret management
Enabled storage orchestration and lifecycle management
Flexible deployment environments
Automated deployment and scaling of containers
Service discovery and load balancing systems
Automated scaling, self-healing, and rollbacks
To understand what a control plane is and how Kubernetes functions, we need to understand that there are multiple Kubernetes clusters on which multiple applications are executed. This is shown in the illustration below.
Focusing on an individual cluster, we see a hierarchical structure defining the components and their relationships. The cluster hierarchy is structured in the following manner:
Control plane: It is the component responsible for managing and overseeing all the applications running on the cluster.
Worker node: It is the component responsible for running several containerized applications.
Pod: It is the smallest deployable component in Kubernetes and is responsible for representing a running instance of one or more containers.
Next, we will examine the control plane's components and understand their role in the Kubernetes cluster.
The control plane, also known as the manager node, acts as the brain of Kubernetes. It maintains the desired state of the cluster, coordinates scheduling, monitors health, handles scaling, and ensures the overall operation of the cluster. The reason why the control plane is crucial in Kubernetes is for several reasons:
Cluster management: The control plane provides centralized management and control over the cluster, allowing administrators and operators to monitor and configure its behavior, set policies, and enforce desired configurations.
Automation and orchestration: The control plane automates and orchestrates various tasks, abstracting away the complexity of managing individual containers and enabling efficient management of large-scale applications.
High availability: The control plane can be configured in a highly available manner with multiple control plane nodes, ensuring operationality in the event of component failures and improving the overall availability and reliability of the cluster.
Scaling and resilience: The control plane allows the addition of worker nodes for scaling and provides mechanisms for self-healing, automatically recovering from failures, and maintaining the cluster's desired state.
This is one of the most essential components of the Kubernetes cluster itself. This API server exposes the cluster, allowing other components to communicate with it. Put simply, all the traffic goes through it, including the control plane components and the ‘etcd’. Furthermore, multiple API servers can be deployed horizontally, balancing the traffic using a load balancer.
As the name suggests, the scheduler is the component that is responsible for scheduling newly created pods to the optimized node. Before diving into the scheduler, we must address what pods are. A pod is the smallest and simplest unit of deployment. It represents a single instance of a running process within the cluster, containing various aspects such as more than one containerized application and configuration details.
Now the scheduler can schedule pods based on the configurations specified in the
Filtering: In this step, the scheduler finds all the nodes that fulfill the requirements for a specific pod.
Scoring: In this step, the scheduler assigns each node a score based on some scoring rules.
After finding the best possible node, it runs the pod on it.
This component focuses on running the controller processes. The controller manager encompasses four processes that run as a single process, reducing the complexity. It maintains the state of the cluster that matches the required state. If the current state isn’t up to the standards of the required state, then it makes the appropriate changes.
The controller manager includes:
Node controller: Manages the availability of all the nodes in the cluster.
Replication controller: Ensures that in the cluster, the right number of pods are running for every replication controller object.
Endpoints controller: Creates endpoint objects for various tasks, such as exposing the pod externally.
Service account and token controllers: Creates default accounts and API access tokens to access the newly created namespaces.
‘etcd’ is one of the key components necessary for any Kubernetes cluster. It is the default data store for Kubernetes. This highly-available key-value store is only accessible by the API server. What etcd stores include:
Cluster configuration
Cluster state
Resource metadata
Secrets and configurations
Events and logs
Read more on etcd.
The cloud controller manager lets us connect on-premises and the cloud-hosted Kubernetes cluster. It exclusively interacts with the cloud platform, while the controllers within it depend on the specific cloud provider being used. However, it is not accessible in on-premises Kubernetes clusters or local installations meant for learning purposes. The cloud-controller-manager combines three controllers within a single process, which are:
Node controller
Route controller
Service controller
Let's check your understanding with a short quiz.
Assessment
Which of the following is NOT a component of the Kubernetes control plane?
API server
etcd
Worker node
Scheduler
The Kubernetes control plane consists of several vital components that work together to manage and coordinate a Kubernetes cluster. These components, including the API server, etcd, controller manager, and scheduler, collaborate to facilitate the smooth operation of containerized workloads. The control plane's role is crucial in maintaining the cluster's desired state. Kubernetes enables organizations to deploy and scale applications by providing a centralized management framework.
Free Resources