When I create a ResourceQuota
object in a namespace but do not create a LimitRange
, I receive a message stating that I must configure requests and limits when creating a Pod. This seems inconsistent with the Kubernetes documentation. Why is this?
As per the documentation I’m reading it may reject if LimitRange not set when you have ResourceQuota set. You can get away with it if you setup default for LimitRange by setting it as admissionwebhook.
If quota is enabled in a namespace for compute resources like `cpu` and `memory` , users must specify requests or limits for those values; otherwise, the quota system may reject pod creation. Hint: Use the `LimitRanger` admission controller to force defaults for pods that make no compute resource requirements.
If you do not have compulsion as enforcement to use it then you can control resource usage by setting up horizontal pod autoscaling (HPA) or vertical pod autoscaling (VPA).