<p>I have a kubernetes cluster running in AWS EKS, with the cluster-autoscaler [1] installed (using the helm provider for terraform [2]).</p>
<p>The cluster-autoscaler docs list a number of supported startup parameters[3], but it's not clear to me how to set them: can anybody point me in the right direction?</p>
<p>[1] <a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler" rel="nofollow noreferrer">https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler</a></p>
<p>[2] <a href="https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release</a></p>
<p>[3] <a href="https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca" rel="nofollow noreferrer">https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca</a></p>

Renoa
<p>Since you are deploying <code>cluster-autoscaler</code> with <code>terraform</code> <code>helm</code> provider you need to set additional parameters like you will do with <code>helm chart</code>.</p>
<p>All parameters are passed <a href="https://github.com/kubernetes/autoscaler/blob/master/charts/cluster-autoscaler/values.yaml#L166" rel="nofollow noreferrer">here</a>.</p>
<p>Some example:</p>
<pre><code>resource &quot;helm_release&quot; &quot;autoscaler&quot; {
  name       = &quot;cluster-autoscaler&quot;
  repository = &quot;https://kubernetes.github.io/autoscaler&quot;
  chart      = &quot;cluster-autoscaler&quot;

  values = [
    &quot;${file(&quot;values.yaml&quot;)}&quot;
  ]

  set {
    name  = &quot;extraArgs.leader-elect&quot;
    value = &quot;true&quot;
  }

  set {
    name  = &quot;extraArgs.scale-down-utilization-threshold&quot;
    value = &quot;0.8&quot;
  }
}
</code></pre>
<p>As a bonus I would advise to move to <a href="https://karpenter.sh/" rel="nofollow noreferrer">Karpenter</a> since it is much better option if you are on <code>AWS</code>.</p>
