Support specifying AZs on the command line
Why do you want this feature?
I'm experiencing failures related to resource availability in an AZ. Rather than create the cluster manually, or request a new type of check, I want the capability to work around the issue.
Helpfully, AWS logs even tell me which AZs are usable, but eksctl does currently not provide a way to make use of that information.
What feature/behavior/change do you want?
A way of specifying AZs to use in creating a cluster. As a command-line option or a file that can be provided. Or a way to export the CFN template that eksctl uses and modify it before making requests to AWs.
A new option for eksctl create cluster which allows the user to specify AZs to be used in cluster creation.
eksctl create cluster --name example ... --az-list=ap-northeast-1b,ap-northeast-1c,ap-northeast-1d
It should error if only one AZ is provided or if AZ from multiple regions are specified.
In my particular case, ap-northeast-1a consistently refuses to allow the creation of new VPC subnets.
[✖] AWS::EC2::Subnet/SubnetPublicAPNORTHEAST1A: CREATE_FAILED – "Value (ap-northeast-1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: ap-northeast-1b, ap-northeast-1c, ap-northeast-1d. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: f12ec04a-80ef-4605-b008-c99094caaece)"
Hi @mcint , we do have that flag, it is called --zones. For the config file we have availabilityZones. Here is an example:
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster-8
region: eu-central-1
availabilityZones:
- eu-central-1a
- eu-central-1b
nodeGroups:
...
I believe it's documented rather clearly already - closing.
@mcint please feel free to re-open if you think docs need to be improved :)
Yes the doc needs to be improved. Nothing hints that availabilityZones is also a possible property for metadata
Hi @hamadycisse , the eksctl site has a new page that documents the schema. Please take a look here and let us know if you think there is still a way we can improve the documentation for the AZs.
Ant there is always the folder of examples which can perhaps be more useful: https://github.com/weaveworks/eksctl/blob/master/examples/05-advanced-nodegroups.yaml#L67
Most helpful comment
Hi @mcint , we do have that flag, it is called
--zones. For the config file we haveavailabilityZones. Here is an example: