Scheduler filtering and scoring
Choose a node that can actually host the Pod
A bookstore worker asks for 400m CPU and 256Mi memory. The scheduler first eliminates nodes that cannot satisfy its constraints, then ranks the remaining candidates. A Pod without a feasible node may wait for conditions to change. Scheduling places the Pod; the kubelet subsequently starts containers. It does not prove that the application is ready.
Compute the remaining requested capacity
For this exercise, allocatable means the capacity advertised for workloads, after node-level reservations. Subtract already assigned effective requests, not the current CPU usage. Oak has 300m CPU and 648Mi available; pine has 600m and 448Mi; elm has 1000m and 148Mi. Only pine passes both requirements. These synthetic numbers omit Pod overhead, init containers, Pod-level budgets, extended resources and other filters. A request equal to the remaining capacity passes this simplified check.
node remaining CPU remaining memoryoak 300m 648Mipine 600m 448Mielm 1000m 148MiRead the requested resources
This complete static Pod manifest uses a deliberately non-pullable image. The CPU and memory requests guide placement; limits constrain runtime behavior. The namespace and all nodes are fictional. Do not apply it to a cluster.
apiVersion: v1kind: Podmetadata: name: catalog-worker namespace: schedule-study labels: app: catalog-workerspec: automountServiceAccountToken: false restartPolicy: Never activeDeadlineSeconds: 120 securityContext: runAsNonRoot: true runAsUser: 10001 seccompProfile: type: RuntimeDefault containers: - name: worker image: example.invalid/bytemind/worker:offline resources: requests: cpu: 400m memory: 256Mi limits: cpu: 500m memory: 384Mi securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALLUnderstand scoring and node conditions
If the request changes to 300m and 256Mi, oak and pine both pass. The actual choice depends on configured scoring plugins and other constraints, not alphabetical order or a single utilization number. A node may also be excluded by its scheduling state, taints, storage topology or other requirements. Node Ready conditions are evidence to inspect; taints and scheduler filters affect eligibility. Low observed CPU does not by itself make a node eligible. Setting nodeName bypasses ordinary scheduler placement and is not a routine fix.
Diagnose a Pending Pod
Start by distinguishing PodScheduled=False from a scheduled Pod waiting for image or volume setup. Read the condition and recent events: a FailedScheduling reason might indicate capacity, affinity or taints. In an explicitly approved disposable cluster, substitute its verified kubeconfig and context before read-only inspection; the examples below are not executed. If no node fits, check the workload requirement and available capacity; do not lower requests blindly.
kubectl --kubeconfig ./lab.kubeconfig --context schedule-lab -n schedule-study describe pod catalog-workerkubectl --kubeconfig ./lab.kubeconfig --context schedule-lab get nodesPractice
Use resource-fit.json and pending-status.json under lab-fixtures/scheduling. Predict eligible nodes before reading the expected results. Explain why a resource-fit check does not demonstrate runtime capacity or real scheduler behavior.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Scheduler filtering and scoring — knowledge check
Apply scheduling concepts using synthetic offline scenarios.
Which node fits the original worker?
Which quantity is relevant to the simplified fit calculation?
A node has exactly 300m free requested CPU; a Pod requests 300m and all other filters pass. What happens?
Two nodes pass all filters. What chooses between them?
PodScheduled=False with FailedScheduling indicates what?