Cluster information:
Kubernetes version: 1.22
Cloud being used: (put bare-metal if not on a public cloud)
Installation method:
From my analysis, I see the targetCPUUtilizationPercentage
param in a HPA spec uses the values configured in the resources.requests
to decide whether the target needs to be scaled up or not.
What options do we have to make the HPA work on the values configured in requests.limits
?
Let’s assume we have the following resources definition in a Deployment:-
resources:
limits:
cpu: 3000m
memory: 200Mi
requests:
cpu: 500m
memory: 100Mi
If i create a HPA with the targetCPUUtilizationPercentage
set to 70%, i observed the scaling happens as soon as the CPU usage touches 70% of the value configured in requests.cpu
. But i want the scaling to happen based on limits.cpu
.
From my experiments, i observed that we can keep the targetCPUUtilizationPercentage
more than 100% to make the scaling work based on values in limits.cpu
and in my case, if i keep the targetCPUUtilizationPercentage
as 420% then the scaling is happening when the CPU usage touches 70% of limits.cpu
.
Now, i have a few questions:-
- Can we keep targetCPUUtilizationPercentage more than 100%?
- Is it officially recommended to keep the percentage greater than 100%?
- Do we see any side effects if we configure the targetUtilizationPercentage to more than 100%?