DevOps Practitioner · Module 1: Kubernetes workload management · Lab
Separate Resource, Taint and Affinity Causes of a Pending Pod
50 min hands-on · Advanced
A local two-node KinD or k3d cluster on a machine you own (two workers so placement is observable).
Local guide: run the steps below on your own machine in order, then check the validation list.
Objectives
- Quote the scheduler reason for three different Pending pods
- Fix each cause with the matching remedy, not with new nodes
- Show all three pods running and state the diagnostic order used
Step 1
Stage three Pending pods
Create one pod with memory requests larger than either node, one repelled by a taint you apply, and one with a hard node affinity to a label that exists nowhere. Collect the FailedScheduling reason for each.
Step 2
Fix each differently
Right-size the oversized request from measured use, add the matching toleration for the tainted pod, and relax the impossible affinity to a soft preference. Reapply each fix from its file.
Step 3
Show the clean schedule
Verify all three pods running on the same two nodes with no cluster resize. Write the diagnostic order followed: events first, capacity second, taints and affinity third.
How to confirm it worked
- Three scheduler reasons quoted from pod events
- Three distinct fixes applied from files, no added nodes
- All pods running on the original node count
- Diagnostic order written down and followed