Kubernetes Fundamentals for VMware Users
Kubernetes Core Components
Inside the Control Plane
In the last section, we introduced the control plane as the brain of a Kubernetes cluster. Now, let's open it up and see what's inside. The control plane isn't one single thing; it's a collection of specialized components working together. Think of it like a command crew on a ship's bridge. Each member has a distinct job, but they all communicate constantly to keep the ship running smoothly.
The control plane is the brain of the Kubernetes cluster, managing its overall state and orchestrating workloads.
These components constantly watch the state of the cluster, compare it to the state you want, and make adjustments to match your desired outcome. Let's meet the key players in this command crew.
The Core Components
Five components form the heart of Kubernetes. Four of them—the API Server, etcd, Scheduler, and Controller Manager—run on the control plane node(s). The fifth, the Kubelet, runs on every single node in the cluster, including the control plane.
API Server (kube-apiserver) The API Server is the front door to the entire Kubernetes cluster. Every command you issue, every component that needs to communicate, and every external tool must go through the API Server. It validates requests and then processes them. You can think of it as a strict but helpful receptionist for the cluster. It takes your requests, ensures you have permission, and then directs the other components to get the work done.
The Kubernetes API (application programming interface) is the front end of the Kubernetes control plane and is how users interact with their Kubernetes cluster.
etcd
If the API server is the front door, etcd is the cluster's secure vault and record book. It is a highly reliable, distributed key-value store that holds all the data about the cluster's state. This includes everything from what applications are running to which nodes are healthy. All decisions are based on the data in etcd, making it the single source of truth. Losing etcd data means losing the state of your cluster, so it is a critical component to protect.
Scheduler (kube-scheduler) When you ask Kubernetes to run a new application (packaged in a unit called a Pod), the Scheduler's job is to find the best home for it. It's like a logistics manager. The Scheduler looks at the available worker nodes, checks their resources (like CPU and memory), and considers any rules you've set. Based on this information, it decides which node is the best fit and assigns the new Pod to that node. It doesn't actually run the workload, it just decides where it should run.
Controller Manager (kube-controller-manager) The Controller Manager is the component that works to make the current state of the cluster match the desired state you defined. It's a collection of several controller processes bundled into one. For example, one controller notices when a node goes down and takes action. Another ensures the correct number of copies (replicas) of your application are always running. If you ask for three copies and one crashes, this controller will notice and schedule a new one. It's the tireless overseer, always working to correct any drift from your instructions.
Kubelet The Kubelet is the primary agent that runs on every single worker node in the cluster. It acts as the local representative of the control plane. The Kubelet receives instructions from the API Server (for example, "start this application container") and carries them out. It's also responsible for reporting the health of the node and the applications running on it back to the control plane. Without the Kubelet, a node is just a server; with the Kubelet, it's a functioning part of a Kubernetes cluster.
Putting It All Together
Let’s walk through a simple sequence of events to see how these components interact.
-
You use the command-line tool,
kubectl, to tell Kubernetes you want to run two copies of your web server. Your command goes directly to the API Server. -
The API Server validates your request and writes this new desired state into etcd. The cluster's official record now says, "two web servers should be running."
-
The Controller Manager sees that the desired state (two web servers) doesn't match the current state (zero web servers). It tells the API server to create two new Pods.
-
The Scheduler sees two new Pods that have been created but not assigned to a node. It evaluates the available worker nodes and assigns each Pod to a suitable one, updating their status via the API server.
-
On a chosen worker node, the Kubelet sees it has been assigned a new Pod. It pulls the necessary container image and starts your web server application.
-
The Kubelet continuously reports the status of the new Pod back to the API Server, which updates the information in etcd. The cluster's state now matches your desired state.
This constant communication loop between the components is what makes Kubernetes so resilient and powerful. It's always watching and always working to enforce the state you define.
Understanding these individual roles is the key to troubleshooting and effectively managing your applications. Each component has a specific responsibility, and together, they provide the automated, self-healing platform that makes Kubernetes so valuable.
Which component acts as the front door for all communication with the Kubernetes cluster, validating and processing requests?
The etcd component is responsible for making sure the current state of the cluster matches the desired state.