How Do VPA Recommendations, Requests, Limits, and Allowed Ranges Work Together?

0
1
Asked By MapleSparrow42 On

I understand CPU requests, limits, VPA recommendations, minAllowed, maxAllowed, and controlledValues individually, but I'm having trouble understanding how they interact when the Vertical Pod Autoscaler updates a Pod. For example, suppose a Pod currently has a CPU request of 100m and a limit of 500m. If the VPA recommends 600m and maxAllowed is set to 800m, what request and limit will ultimately be applied?

2 Answers

Answered By CloudyPine7 On

VPA primarily adjusts resource requests. The recommendation is first constrained by minAllowed and maxAllowed, so a 600m recommendation remains 600m when the allowed range is up to 800m. If the VPA is configured to control both requests and limits, it preserves the original request-to-limit ratio. Since the original values were 100m request and 500m limit—a 1:5 ratio—the resulting values would be a 600m request and a 3000m limit. The limit does not remain at 500m in that mode.

RiverStone18 -

So the request would not be rejected just because it becomes larger than the original limit. The limit is recalculated from the original ratio, which keeps it above the updated request.

Answered By VelvetCactus31 On

The exact result also depends on controlledValues. With RequestsAndLimits, VPA updates both values and maintains the request-to-limit ratio from the Pod specification. With RequestsOnly, VPA changes only the request, leaving the existing 500m limit unchanged. In that configuration, a 600m request would exceed the 500m limit, so choosing the control mode carefully is important.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.