Share via

AKS HPA does not scale in

Heorhii Teriaiev 70 Reputation points
Jun 7, 2023, 2:22 PM

Hi there,

We use HPA on our AKS clusters but it doesn't seem to work correctly. While our load is around 0%, HPA never scales it in. Even if we manually scale it in to 1 pod, it scale it back out with an empty reason.

User's image

it's also not really clear why it keeps those num of pods there (2 and 5)

Here's backend-web HPA spec for example

User's image

events from the HPA are not really useful here:

User's image

sometimes it fails to get metrics but it doesn't happen constantly, so I doubt it affects anything.

I also found a similar forum question but it looks like nobody works on that: https://learn.microsoft.com/en-us/answers/questions/844841/hpa-is-not-working-properly-in-aks

Can you please suggest if there's any known issue with AKS HPA? Thank you in advance.

Cheers,

Gosha

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,232 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.