How to specify `--asg-access` in config file with eksctl?
Asked Answered
P

1

10

I am trying to create a Kubernetes on AWS EKS cluster using eksctl with autoscaling enabled using proper IAM permissions. As per the documentation:

You can create a cluster (or nodegroup in an existing cluster) with IAM role that will allow use of cluster autoscaler:

eksctl create cluster --asg-access

I am trying to run

eksctl create cluster --asg-access -f myconfig.yml

But getting this error:

[✖]  cannot use --asg-access when --config-file/-f is set

Is their a way to use --asg-access within the config file? I try to look for a related config in the config file schema doc to no avail.

Paleogeography answered 2/8, 2019 at 11:16 Comment(0)
D
23

You can enable autoscaling within config file without passing asg-access flag, i.e.

iam:
  withAddonPolicies:
    autoScaler: true

Example

Hope this will help

Decato answered 2/8, 2019 at 13:8 Comment(3)
Thanks, that's on the nodegroup level, but is it possible on the cluster level?Paleogeography
@PierreB I don't think you can make it on cluster level.Decato
I ended-up doing it on the nodegroup level as you suggestedPaleogeography

© 2022 - 2025 — McMap. All rights reserved.