Pod Operations
Updated Apr 07, 2022 ·
Overview
When deploying a cluster with a ReplicaSet of 5 using kubectl, the steps are as follows:
- The request is sent from kubectl to the API Server.
- The API Server logs the info to the cluster store.
- The Controller Manager spins up 5 Pods per the ReplicaSet, then sends this to the Scheduler.
- The Scheduler assigns the Pods to two Nodes for deployment.
- Each Node’s kubelet queries the API Server for updates.
- Node 1 starts three Pods, and Node 2 starts the remaining two.
- The Controller Manager tracks the state of the replicas.
One Node Fails
If Node 2 fails:
- Node 2 stops responding, and the Controller Manager identifies a state mismatch.
- The Controller Manager requests rescheduling from the Scheduler.
- The Scheduler assigns the two down Pods to Node 1.
- Node 1’s kubelet detects the state change and starts the additional Pods.