Interview Prep/Kubernetes/Resources, autoscaling and scheduling

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 →

  1. Create a LimitRange with default, defaultRequest, min and max
  2. Apply with kubectl apply -f in the namespace
  3. Check an unconfigured pod gets defaults via kubectl get pod -o yaml
  4. Keep ResourceQuota for the namespace total
  5. 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, autoscaling and scheduling