Conditional scaling with Kubernetes Horizontal Pod Autoscaler

5/14/2018

I was wondering if it was possible to use conditions before the Kubernetes HPA does anything like scaling.

Would it be possible for the HPA to check if say, a pod was being used before it was terminated, either via API or by using a database?

We use a frontend which people connect to, and a backend which handles the load. However, if a backend pod is terminated by the HPA, the frontend would hang and not do anything anymore. The whole load would have to be restarted by refreshing the frontend as well so that a new backend could be chosen.

Any suggestions are welcome, Thank you.

-- SanderGoes
kubernetes

0 Answers