<p>I'm following the instructions on <a href="https://eksworkshop.com/beginner/080_scaling/deploy_ca/" rel="nofollow noreferrer">https://eksworkshop.com/beginner/080_scaling/deploy_ca/</a> to deploy the cluster-autoscaler. </p>

<p>While following the instructions i notice that the cluster_autoscaler.yml file contains only one nodegroup to scale:</p>

<pre><code>command:
  - ./cluster-autoscaler
  - --v=4
  - --stderrthreshold=info
  - --cloud-provider=aws
  - --skip-nodes-with-local-storage=false
  - --nodes=2:8:eksctl-eksworkshop-eksctl-nodegroup-0-NodeGroup-SQG8QDVSR73G
env:
  - name: AWS_REGION
    value: us-east-1
</code></pre>

<p>This leads me to believe that only that autoscaling group in aws will be scaled out when more pods need to be scheduled.</p>

<p>The reason I need to add two autoscaling groups is that one of the groups has OnDemand pricing and the other has Spot pricing and one of my deployments will schedule pods in the OnDemand autoscaling group while the other will schedule pods in the Spot autoscaling group.</p>

<p>Can I add two nodegroups in the <code>- --nodes</code> section of the file or is there some other way of doing what I'm asking?</p>

<p>You can just add another line with a second nodegroup, e.g.</p>

<pre><code>command:
  - ./cluster-autoscaler
  - --v=4
  - --stderrthreshold=info
  - --cloud-provider=aws
  - --skip-nodes-with-local-storage=false
  - --nodes=2:8:eksctl-eksworkshop-eksctl-nodegroup-0-NodeGroup-SQG8QDVSR73G
  - --nodes=2:8:NodeGroup2
</code></pre>

<p>See <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-multi-asg.yaml" rel="nofollow noreferrer">this example here</a>.</p>
