edmamerto
edmamerto

Reputation: 8155

Understanding Kubernetes pod resource utilization in GCP monitoring

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

[Update]

Upvotes: 0

Views: 90

Answers (1)

Kelson Martins
Kelson Martins

Reputation: 116

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

Upvotes: 3

Related Questions