Add namespace-level quotas, default resource limits, and a deny-by-default posture so each team gets a fair slice of the cluster instead of a buffet with root access.
#containers#cost#reliability
LabPodsnack Academy, a training cluster where one student's "tiny test" spun up enough memory requests to make everyone else's labs fall over like wet cardboard.all labs
02 - Actions
score -- - -- votes
-- completed
Sign in with a real account to save ratings, completions, and share snapshots.
Stateloading
03 - Scenario
Podsnack Academy, a training cluster where one student's "tiny test" spun up enough memory requests to make everyone else's labs fall over like wet cardboard.
Add namespace-level quotas, default resource limits, and a deny-by-default posture so each team gets a fair slice of the cluster instead of a buffet with root access.
Constraints
Every workload namespace has a ResourceQuota
Pods without explicit requests and limits receive sane defaults
Quota denial is demonstrated with a deliberately oversized deployment
The pattern is cluster-agnostic and works on managed Kubernetes or kind
ScenarioMULTI - beginner
05 - Steps
STEP_01
Create the team namespace
Create a namespace for one training team and label it with owner and cost metadata. The namespace is the accounting boundary for the rest of the lab.
Add a LimitRange that gives containers sane default CPU and memory requests/limits when developers forget them. Forgotten limits should not turn into accidental cluster-wide performance art.
Apply a deliberately oversized deployment or scale the normal one past the namespace limit. Capture the admission or scheduling failure that proves the quota works.
Hint: A failure here is success. The cluster saying "no" is the sound of other students still being able to use it.
Steps5 tasks
06 - Deliverables
Terraform for the namespace, ResourceQuota, LimitRange, and test deployment
Output showing default requests/limits were applied to a pod
Output showing an oversized workload was rejected or could not be scheduled under quota
Deliverables3 required
07 - Rubric
ResourceQuota caps CPU, memory, pods, and at least one object count30%
LimitRange applies defaults to pods that omit requests and limits30%
A normal workload runs successfully under quota15%
An oversized workload is denied or constrained with captured proof25%