Question 21
Domain 3: Application Environment, Configuration, and SecurityWhich Kubernetes resource is used to set default CPU/memory requests and limits for Pods in a namespace?
Correct answer: A
Explanation
LimitRange is the namespace-scoped resource that sets default and maximum resource values for Pods and containers. It can define default CPU and memory requests and limits so Pods inherit them when they are not specified, which is why it is used for this purpose.
Why each option is right or wrong
A. LimitRange
Under the Kubernetes API, a LimitRange object is the namespace-scoped resource defined in the core/v1 API that can specify default and defaultRequest values for CPU and memory, along with min/max constraints, for Pods and containers in that namespace. When a Pod omits resource requests or limits, the admission controller applies the LimitRange defaults automatically, which is exactly the behavior being tested here.
B. ResourceQuota
C. PodDisruptionBudget
D. NetworkPolicy