Hi everyone,
In a multi-tenancy Kubernetes environment with a CPU quota set per namespace, I’m wondering about the best approach to handle workload fluctuations.Suppose I have two pods:
• The first pod consumes 2000m during the day and 500m at night.
• The second pod consumes 500m during the day and 2000m at night.
To ensure their proper operation, I set a CPU limit of 2000m on each pod. Am I required to request a CPU quota of 4000m for the namespace, even though both pods never use 4000m simultaneously? In other words, does Kubernetes consider the actual CPU usage of the pods, or does it only rely on the sum of the defined limits, regardless of their real-time consumption?
Additionally, if—exceptionally—both pods need to consume 2000m at the same time and they are already deployed, is there any mechanism in Kubernetes that can dynamically limit their total combined consumption to 2000m to stay within the namespace quota?
Thanks in advance for your insights!