0
0
Kubernetesdevops~10 mins

Control plane components (API server, scheduler, controller manager, etcd) in Kubernetes - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Control plane components (API server, scheduler, controller manager, etcd)
User/API Client
API Server
etcd (State Storage)
Controller Manager
The user sends requests to the API server, which stores state in etcd. The controller manager and scheduler watch the API server to manage cluster state and assign work.
Execution Sample
Kubernetes
kubectl run mypod --image=nginx
# API server receives request
# Scheduler assigns pods to nodes
# Controller manager ensures desired state
# etcd stores cluster state
This sequence shows how a pod request flows through control plane components to schedule and maintain pods.
Process Table
StepComponentActionInputOutput/Effect
1User/API ClientSends requestkubectl run mypod --image=nginxRequest sent to API server
2API ServerReceives requestkubectl run mypod --image=nginxValidates and processes request
3API ServerReads/Writes stateRequest dataWrites pending pod to etcd
4SchedulerWatches API serverPod pending schedulingAssigns pod to a node
5Controller ManagerWatches API serverPod assigned to nodeEnsures pod is running as desired
6etcdStores cluster statePod info updatesPersistent cluster state updated
7API ServerResponds to userPod info from etcdReturns pod info to kubectl
8User/API ClientReceives responsePod infoDisplays pod info to user
💡 Request completed and pod state maintained by control plane components
Status Tracker
VariableStartAfter Step 2After Step 4After Step 6Final
Pod Request StateNoneReceived by API serverAssigned to node by SchedulerStored in etcdConfirmed running by Controller Manager
Cluster State in etcdInitial cluster stateNo changeNo changeUpdated with pod infoUpdated with pod running status
Key Moments - 3 Insights
Why does the scheduler assign pods after the API server receives the request?
Because the API server validates and stores the pod request first (see execution_table step 3), the scheduler can then watch for new pods needing assignment (step 4).
How does etcd help keep the cluster state consistent?
etcd stores the persistent cluster state (step 6). All components read and write to etcd via the API server, ensuring a single source of truth.
What role does the controller manager play after the scheduler assigns a pod?
The controller manager ensures the pod is running as desired by monitoring the API server state and making adjustments if needed (step 5).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, at which step does the scheduler assign a pod to a node?
AStep 3
BStep 5
CStep 4
DStep 6
💡 Hint
Check the 'Component' and 'Action' columns in execution_table row 4.
According to the variable tracker, what is the state of the pod request after step 6?
AStored in etcd
BAssigned to node by Scheduler
CReceived by API server
DConfirmed running by Controller Manager
💡 Hint
Look at 'Pod Request State' column 'After Step 6' in variable_tracker.
If the API server did not update etcd, what would happen to the cluster state?
ACluster state would remain consistent
BCluster state would not update with pod info
CScheduler would assign pods twice
DController manager would ignore pods
💡 Hint
Refer to execution_table step 6 and variable_tracker 'Cluster State in etcd'.
Concept Snapshot
Control plane components manage Kubernetes cluster state.
API server handles requests and communicates with etcd.
Scheduler assigns pods to nodes.
Controller manager ensures desired state.
etcd stores persistent cluster data.
Full Transcript
In Kubernetes, the control plane components work together to manage the cluster. The user sends a request to the API server, which validates and processes it. The API server reads and writes cluster state to etcd, the persistent storage. The scheduler watches for pods needing assignment and assigns them to nodes. The controller manager monitors the cluster state and ensures pods run as expected. This flow keeps the cluster consistent and responsive to user commands.