<p>When creating a cluster using <code>eksctl</code> on the command line, one can specify availability zones using the "zones" flag, like so:</p>

<pre><code>eksctl create cluster \
--name example \
--version 1.16 \
--region us-east-1 \
--zones us-east-1a,us-east-1b,us-east-1c
</code></pre>

<p>In the <code>eksctl</code> documentation, <a href="https://eksctl.io/usage/creating-and-managing-clusters/" rel="noreferrer">it is noted</a> that configuration files are more flexible than flags. However, <code>eksctl</code> configuration file options are poorly documented, and there is no way to <a href="https://github.com/weaveworks/eksctl/issues/633" rel="noreferrer">generate config files from flags</a>.</p>

<p>The <code>eksctl</code> repo provides is <a href="https://github.com/weaveworks/eksctl/blob/master/examples/04-existing-vpc.yaml" rel="noreferrer">an example that uses an existing VPC with predefined subnets</a>, but this provides no visibility into how the same settings relate to <em>de novo</em> VPCs. It is also much more fine-grained than what is necessary with the flags.</p>

<p>If one were highly proficient in golang (and very patient), one could figure it out from source, but IMO this defeats the purpose of a turnkey solution like <code>eksctl</code>.</p>

<p>Is there a way to use a config file to achieve what is achieved in the flag example above? If so, how?</p>

<p>This is a yaml that i used a few days ago to build a cluster with eksctl:</p>

<pre><code>apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: myname
  region: us-east-1

nodeGroups:
  - name: ng-1
    labels:  
      worker: default
    instanceType: m5.xlarge
    desiredCapacity: 1
    minSize: 1
    maxSize: 10
availabilityZones: ['us-east-1a', 'us-east-1b', 'us-east-1c', 'us-east-1d']
</code></pre>
