<p>For <code>ReplicaSets</code> I see there is a way to use a Horizontal Pod Autoscaler (HPA) and set a max/min value for the number of replicas allowed. Is there a similar feature for <code>StatefulSets</code>? Since it also allows you to specify the number of replicas to deploy initially? For example, how would I tell Kubernetes to limit the number of pods it can deploy for a given <code>StatefulSets</code>?</p>

<p>I have posted community wiki answer for better visibility.
<a href="https://stackoverflow.com/users/213269/jonas" title="102,968 reputation">Jonas</a> well mentioned in the comment:</p>
<blockquote>
<p>First sentence in the <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">documentation</a>:</p>
</blockquote>
<blockquote>
<p>&quot;The Horizontal Pod Autoscaler automatically scales the number of Pods in a replication controller, deployment, replica set or stateful set&quot;</p>
</blockquote>
<p>summary, <strong>it is possible to set min / max replicas for a statefulset using HPA.</strong> In <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">this documentation</a> you will learn how HPA works, how to use it, what is supported etc. HPA will not work only with the objects that can't be scaled, for example, DaemonSets.</p>
<p>See also this <a href="https://stackoverflow.com/questions/54663845/apply-hpa-for-statefulset-in-kubernetes">related question</a>.</p>
