Exploring Kubernetes Components: API Server, Scheduler, Controller Manager, and More
December 23, 2024

Exploring Kubernetes Components: API Server, Scheduler, Controller Manager, and More

Kubernetes is a broad platform with various components working together to ensure efficient deployment, management and scaling of containerized applications. Below, we’ll take a closer look at some of the key components of Kubernetes that play a vital role in managing the operation of the cluster.


Kubernetes key components


1. API server

this API server It is the central management point of Kubernetes. It is a REST API endpoint that allows clients (e.g. kubectlother Kubernetes components, or external systems) interact with the cluster.

  • Role: The API Server acts as the gateway for all interactions with the cluster. Whether you are deploying an application, checking cluster status, or querying resources, it is the API Server that handles these requests.
  • feature:

    • Handles authentication and authorization.
    • Validate and handle REST API requests.
    • By providing a unified API, it acts as a communication center between all Kubernetes components (such as schedulers, controller managers, etc.).
    • Manages requests for cluster state and stores them in waitkey-value storage.


2. controller manager

this controller manager Responsible for regulating the status of the cluster. The controller is a background process that ensures the required state defined in the Kubernetes manifest is met and continues to correct any changes in the cluster.

  • Role: It runs a controller that constantly monitors the current state of the cluster and makes changes as necessary to match the desired state.
  • feature:

    • Copy controller: Ensure that the specified number of pod replicas are always running.
    • node controller: Responsible for monitoring the health of nodes and managing their lifecycle (e.g., handling node failures).
    • Deployment controller: Manage the deployment process to ensure the correct number of Pods are deployed and scaled correctly.
    • job controller: Handles the creation and management of jobs that run to completion.

The controller manager ensures that if something goes wrong (such as a Pod crashing), Kubernetes will react and fix the problem automatically.


3. scheduler

this scheduler Responsible for assigning work (i.e. Pods) to available nodes in the cluster. The Scheduler monitors newly created pods that have no assigned nodes and selects appropriate nodes based on resource requirements and other constraints.

  • Role: The scheduler decides which node should run each pod based on available resources (CPU, memory, etc.), node taints, affinity rules, and any other constraints defined in the pod configuration.
  • feature:

    • Consider factors such as resource availability, taint and tolerance, pod affinity/anti-affinity, etc. when selecting nodes.
    • Make decisions based on current workloads and how best to distribute them across clusters.
    • Scheduling decisions can be made based on custom priorities or resource constraints.

The scheduler is critical to ensuring that workloads are evenly distributed across nodes, preventing any single node from being overloaded.


4. wait

wait It is a decentralized key-value store that saves all cluster data of Kubernetes, including configuration, resource definitions, status and metadata. It is the source of truth for the entire cluster.

  • Role:etcd is used to store the state of the entire Kubernetes cluster. When you make changes, such as deploying new Pods or scaling your application, these changes are reflected in etcd.
  • feature:

    • Store data in a consistent and highly available way.
    • Provides high-speed access to configuration and status data.
    • Essential for disaster recovery and fault tolerance; if the Kubernetes cluster is restarted, it will recover from the state stored in etcd.


5. Cubelet

this Cubelet Is an agent that runs on each worker node in the cluster. It is responsible for ensuring that the containers in the node are running as expected and reporting back to the master component.

  • Role: Kubelet ensures that the containers in each Pod are running and healthy. It monitors the Pod’s resource usage and reports status updates back to the API server.
  • feature:

    • Execute container execution time to start the container (e.g. Docker, containerd).
    • Ensure that the container operates as specified in the Pod specification.
    • Monitor Pod updates and adjust containers as needed.
    • Report node and Pod health to the API server.

If a Pod fails or is evicted from a node, Kubelet will ensure that the container is restarted or rescheduled as needed.


6. Become an agent

this Become an agent Runs on each node in the cluster and is responsible for maintaining network rules to allow communication between Pods across different nodes. It supports network connections between services, ensuring that services in Kubernetes are accessible within the cluster.

  • Role: Kube Proxy facilitates network connections between services and manages load balancing of network traffic to appropriate Pods.
  • feature:

    • Manage the service network to ensure traffic is forwarded to the appropriate Pod.
    • Implement various load balancing methods, including round robin and IP hashing.
    • and iptables or IPVS (IP Virtual Server) forwards traffic to the appropriate backend Pod.

Kube Proxy ensures that all Pods can communicate, even if they are on different nodes in the cluster.


7. Cloud Controller Manager

this Cloud Controller Manager Allows Kubernetes to interact with cloud providers (such as AWS, Google Cloud, or Azure) and manage resources specific to the cloud environment.

  • Role: It manages the integration between Kubernetes and cloud providers. For example, it can create or delete cloud resources such as load balancers, persistent volumes, and external IP addresses.
  • feature:

    • Manage cloud provider-specific tasks, such as attaching persistent storage to nodes or managing cloud-based load balancers.
    • Ensure cloud infrastructure is seamlessly integrated with Kubernetes components such as pods or services.

This component is particularly useful in cloud-native environments where Kubernetes clusters are hosted in the public cloud.



Kubernetes architecture review

  1. control plane: Responsible for controlling the cluster and includes things like API server, controller manager, schedulerand wait.
  2. Work node: Hosted containers to run application workloads. Components on these nodes include Cubelet, Become an agentand container operation.
  3. Cloud integration: this Cloud Controller Manager Connect Kubernetes with cloud services and resources.


in conclusion

Kubernetes is a complex system that integrates various components to automate and manage containerized applications. Every element in the Kubernetes architecture plays a critical role in ensuring that applications run efficiently, scale, and recover gracefully from failures. By understanding roles and interactions API server, scheduler, controller manager, wait, Cubelet, Become an agentand other components, you can gain a complete understanding of how Kubernetes orchestrates applications in distributed environments.

2024-12-23 10:54:34

Leave a Reply

Your email address will not be published. Required fields are marked *