Quotas and limits Flashcards
What is the use of quotas
Quotas is required if we need to restrict the CPU and memory resources of a namespace. The limits specified will be the max the namespace can use.
What is the user of default requests and limits in LimitRanges
When a namespace has quotas assigned every container that is part of the ns will need to define a memory limit and memory request. If not the pod will not be schedulable. In case users create pods without any requests or limits set then we can use the default requests and limits defined in the LimitRange object to assign to the containers of the pods
What if a pod is created with limits set but no requests set and the ns has a limit range with defaults set
pod requests be the same as the limits specified in the manifest
What is general rule of requests limits evaluation
Quotas has limits only set - Every pod should have a limit set or default limits should be set on limitRange
Quotas has requests only set - Every pod should set requests or a default requests should be set
Quotas has both limits and requests set - Every pod should declare requests and limits or a default requests and limits can be specified.
what if a pod is created with only requests set but no limits and the ns has a limitrange defining default requests and limits
the Limit for the pod will be taken from the limitrange
What will happen if you have a quota for mem on ns and you also have limitrange specifiying only min and max for memory. You create a pod without any requests and limits set will the pod be scheduled?
Yes when we don’t specify the memory limit/req it is taken from the limit ranges but in our limitrange definition there is no default requests and limits set. Even though we don’t set it once we set a limit for min and max, the max will be taken as the default request and limit