let's say I have the following resource requests:
And I have the following limits:
And I have the following utilization
Question... Is utilization % of limits or % of requests?
My presumption is it would be % of limits. So then if I want my cpu at 75% utilization I would just have to scale it down which would get me to 200m
using the math below
(15.01%*1000)/0.75 = 200
you are correct. kubectl top pod
also presents the current usage in millicores, so it can also be used to calculate a possible limit reduction.
kubectl top pod | grep prometheus-k8s | awk '{print $2}
405m
So I set my limit with. (405 * 100) / 75 = 540m