New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow HPA to scale to 0 #69687

shosti opened this Issue Oct 11, 2018 · 1 comment


None yet
2 participants

shosti commented Oct 11, 2018


/kind feature

What happened:

I am trying to set up a HorizontalPodAutoscaler for a worker deployment that scales up and down based on a queue size (which feeds into a custom metric). The queue is quite bursty, so I would like the deployment to be scaled to 0 unless there are messages in the queue. I tried setting minReplicas to 0, but got errors like:

HorizontalPodAutoscaler.autoscaling "my-autoscaler" is invalid: spec.minReplicas: Invalid value: 0: must be greater than 0

(Using the autoscaling/v2beta1 API).

What you expected to happen:

I would expect it to be allowed for autoscalers to scale deployments down to 0 for these kinds of bursty workflows. Apologies if this has already been requested/discussed--I looked around but only found a vague mention of this in and #3247.

How to reproduce it (as minimally and precisely as possible):

Try to make a HorizontalPodAutoscaler with API autoscaling/v2beta1 and minReplicas: 0.

Anything else we need to know?:


  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:01Z", GoVersion:"go1.10.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.7-gke.2", GitCommit:"8d9503f982872112eb283f78cefc6944af640427", GitTreeState:"clean", BuildDate:"2018-09-13T22:19:55Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: GKE

This comment has been minimized.

Show comment
Hide comment

shosti Oct 11, 2018

/sig autoscaling

shosti commented Oct 11, 2018

/sig autoscaling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment