Lab Scenarios
- OOM Scenario: Intentionally set a very low memory limit for a backend pod and generate traffic. Observe the
OOMKilledevent and the container restart. - Node Pressure Scenario: Simulate broader node-level contention by running multiple high-memory pods. Observe the difference in eviction behavior between Burstable and Guaranteed workloads.
Core Exercises (Required)
- Identify QoS: Use
kubectl get pod <pod> -o jsonpath='{.status.qosClass}'to find the QoS class of your running backend and frontend pods. - Check Usage: Use
kubectl top pod -n developto see the actual CPU and memory consumption in thedevelopnamespace. - Verify Quota: Run
kubectl get resourcequota -n developand explain what happens if you try to deploy a pod that exceeds the memory hard limit.
Challenge Exercise (Optional)
Dual Failure Mode Trigger: Trigger both OOMKilled and CPU throttling on the same pod by crafting specific resource limits and load patterns. Document the QoS class assignment and explain the triage sequence for each failure mode.
Done When
You have completed this chapter when:
- You can explain Burstable vs. Guaranteed vs. BestEffort QoS classes.
- You have successfully identified an
OOMKilledevent in a pod’s history. - You can verify namespace
ResourceQuotaandLimitRangeenforcement. - You understand why Guaranteed QoS is the safest choice for critical production services.
Knowledge Check
Before finishing this chapter, complete the Quiz to verify your understanding of the guardrail principles.