Controllers and scheduling
Two different questions: how many, and where?
A workload controller works toward an intended workload state. The scheduler decides where an unassigned Pod can run. For example, when a two-copy catalog application has only one active Pod, a ReplicaSet controller can request another. The scheduler must then find a node that can accommodate it. Neither action alone proves that the application is healthy.
How controllers respond to changes
Controllers use feedback: observe relevant objects, compare with the intended configuration, request an action if needed, and observe again. Built-in controllers exchange information through the API server. A watch is an API mechanism that lets a client receive changes to resources; reconciliation also needs to cope with retries and missed or stale observations. A Deployment manages ReplicaSets and a ReplicaSet manages the appropriate Pod population. Controllers do not directly launch the application process in a worker’s runtime.
How a scheduler chooses a node
For an ordinary Pod that uses the default scheduler, placement involves finding eligible nodes and ranking the candidates. Eligibility includes requested computing resources and relevant placement constraints. A resource request is a declared amount of computing capacity used for placement decisions. A node can appear idle while its existing workloads have already reserved most of its allocatable capacity. The scheduler records a binding (the association of a Pod with a node) through the API. If there is no suitable candidate, placement must wait until conditions permit it.
Worked example: choose a candidate
Assume only CPU capacity matters in this simplified teaching fixture. One CPU is a unit of CPU capacity; 0.5 CPU means half of that unit. A new catalog Pod requests 1 CPU. Node A has 4 CPU allocatable and 3.5 already requested. Node B has 4 allocatable and 2 already requested. Node C has 2 allocatable and 1.5 already requested. Subtract existing requests from allocatable CPU, giving 0.5, 2 and 0.5 respectively. Only B can satisfy this request. Actual scheduling considers other constraints and scoring rules too.
Worked example: the replica exists but cannot run
In the separate offline timeline below, the desired count is 2. Initially only one Pod exists and is ready. The controller creates one more Pod object, but every node lacks the requested CPU. Now two Pods exist, one remains unassigned and only one is ready. Adding suitable capacity in an authorized lab could allow placement. After placement, the new Pod still needs its containers to start and become ready. These are separate transitions.
Offline illustration (not command output):
Teaching snapshot Desired Exists Assigned ReadyInitial state 2 1 1 1Replacement created 2 2 1 1Capacity available 2 2 2 1Replacement ready 2 2 2 2Choose evidence before a fix
If no replacement object appears, investigate the relevant controller and API access. If it exists but has no assigned node, inspect scheduling evidence such as capacity and placement constraints. If it is assigned but not ready, investigate startup and application readiness. These are starting points, not proofs of a single root cause. Repeatedly submitting more objects may add pressure without addressing the reason placement failed.
Common mistakes
A scheduler does not increase a Deployment’s desired replica count. A replica controller does not reserve physical CPU or pick the worker node. Low measured CPU usage is not proof that the next requested CPU fits. Kubernetes does not automatically acquire more computers in every cluster; node scaling needs an appropriate separate mechanism.
Try it yourself
Using the CPU example, change the incoming request from 1 CPU to 0.5 CPU. Calculate the eligible nodes under the stated CPU-only rule. Explain why the information is insufficient to choose the actual node when several candidates remain. Then describe the next step after a Pod is assigned. The next lesson considers failures that affect several parts of a cluster.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Controllers and scheduling — knowledge check
Apply the concepts from this lesson to short offline scenarios.
A ReplicaSet needs one more Pod. Who requests creation of the Pod object?
A Pod needs 1 CPU. Node A has 0.5 CPU remaining and B has 2 CPU remaining. Under the CPU-only fixture rule, which node is eligible?
There are two desired Pods, two existing Pods, one assigned and one ready. What is a reasonable next investigation?
Why might an apparently idle node reject placement of a new Pod?
Which statement describes binding?