0

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.

  • can you elaborate on your query? what exactly you want to check and how is it related to horizontal scaling. – Prateek Jain May 14 '18 at 11:17
  • Can you create a Horizontal Pod Autoscaler that only terminates a pod when that pod is "free"? Either by creating a custom metric or by specifying any rules? It's not adding any new pods that is the problem, it's when there are too many pods and it needs to be scaled down. – SanderGoes May 14 '18 at 11:34
  • Potential duplicate of: https://stackoverflow.com/questions/50080526/how-does-pod-replica-scaling-down-work-in-kubernetes-horizontal-pod-autoscaler/50085109#50085109 – Vishal Biyani May 14 '18 at 12:38
  • It's similar yes, I ask though if it is possible to add extra things that a HPA considers before downscaling, or if it merely is a static thing? – SanderGoes May 14 '18 at 13:10

0 Answers0