<p>community.</p>
<p>I have doubts about the use of HorizontalPodAutoscaler (HPA) in Kubernetes, what are the best practices of using HPA, especially in the implementation of MaxReplicate, as an example, If I have a cluster with 3 workers nodes running a single app, and setting up the HPA to scale up to 20 pods, but it is a good practice scale pods 3x more than the available nodes? Or scale the pods up to the same quantity of available worker nodes in the cluster as a better approach?</p>
<p>Thank you in advantage</p>

<p>first of all you need to test your application and decide a reasonable resources per pod &quot;request and limits&quot;</p>
<p>After setting the limit per pod then you know how many pods your cluster can maintain.
<code>for example if you have total/free 10 cpu and 10 Gi memory over the cluster  and you set limit per pod to have 1 cpu and 1 Gi memo then you can run up to 10 pods.</code></p>
<p>then it's time to run your load test and fire the expected traffic at its max with the lowest number of pods you're planning to run that fit the normal/daily traffic .. gradually startup new pod and check if you can handle the high traffic or you need to add more pods still .. repeat this till you reach a appropriate number of pods. then you got the maximum number of pods that you can configure in your HPA.</p>
