2

On Openshift 4, I did setup HPA(horizontal pod autoscaler) with min pods as 3, which guarantees that at least three pods up and running all the time.

When I set replicas to zero in Deployment Config, no pods are running which is expecting since I change replicas to zero.

Question: Does HPA respect min pods condition only when replicas set to +ve value(non zero)? That is the behavior I have noticed. I am trying to get help to understand how replicas and HPA works.

Mallesh
  • 147
  • 1
  • 7

1 Answers1

2

Yes. HPA respect min pods condition only when replicas set to greater than 0. HPA always look to the pod configuration.

for more info have a look on this https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#appendix-horizontal-pod-autoscaler-status-conditions

Dashrath Mundkar
  • 7,956
  • 2
  • 28
  • 42
  • Thank you for the reference doc. I could now verify that from HPA. ScalingActive False ScalingDisabled scaling is disabled since the replica count of the target is zero – Mallesh Jul 27 '20 at 20:30