What does a LimitRange do and why combine it with ResourceQuota?
BeginnerScenarioResources, autoscaling and scheduling
Answer
Situation read → A namespace has pods without requests and the quota rejects them.
What I'd do →
- Create a
LimitRangewithdefault,defaultRequest,minandmax - Apply with
kubectl apply -fin the namespace - Check an unconfigured pod gets defaults via
kubectl get pod -o yaml - Keep ResourceQuota for the namespace total
- Document the defaults for developers
Why → LimitRange sets per-pod defaults and bounds, quota sets the total.
Interview tip → Say it prevents both unbounded pods and huge single pods.
More on Resources, autoscaling and scheduling
How do you choose requests and limits for a new service?BeginnerPods are Pending with `0/6 nodes are available: 6 Insufficient cpu`. What do you do?IntermediateExplain QoS classes and which pods get evicted first.IntermediateCPU limits cause latency spikes though average usage is low. Why and what is the fix?IntermediateHow do you configure an HPA on CPU?BeginnerHPA shows `<unknown>/70%` for CPU. What do you do?Intermediate