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.
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