What happened?
I tried creating a cluster in us-east-1 using eksctl create cluster --region=us-east-1 and got the following error
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::NatGateway/NATGateway: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Cannot create cluster 'app-staging' because us-east-1e, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f (Service: AmazonEKS; Status Code: 400; Error Code: UnsupportedAvailabilityZoneException; Request ID: 830e951d-7d99-11e9-a98d-d92990e73a23)"
I've gotten this error a few times,
What you expected to happen?
I expected it to use a proper availability zone and create the cluster successfully
How to reproduce it?
eksctl create cluster --region=us-east-1 but it does not happen always, randomly if it selects the wrong subnet region us-east-1e it seems to fail always
Anything else we need to know?
on MacOS mojave using eksctl downloaded through homebrew
Versions
[ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.1.32"}
Darwin test-mac 18.2.0 Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64 x86_64
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Logs
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::NatGateway/NATGateway: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
[✖] AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Cannot create cluster 'app-staging' because us-east-1e, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1f (Service: AmazonEKS; Status Code: 400; Error Code: UnsupportedAvailabilityZoneException; Request ID: 830e951d-7d99-11e9-a98d-d92990e73a23)"
this is the error part of the log but i can post more if necessary
So in general, when you get a "because us-east-1e, the targeted availability zone, does not currently have sufficient capacity to support the cluster" that means that the AWS region has run out of underlying EC2 instances of that type (or maybe EKS capacity, I'm not sure).
I doubt this is a bug with eksctl - I bet if you try it again now, or at a different time, you'd succesfully create the cluster. Out of resource errors tend to be very transient 😄 good luck!
Thanks for reporting!
Yeah, as @cpaika has kindly explained, I feel like this isn't an issue in eksctl. A potential U/X enhancement would be tweak the error message eksctl produces, so that it has nothing to do with eksctl.
I'm closing as not a bug. But please feel free to submit a feature request if necessary 🙏
Hi @jrusso1020 , thank you for the report. As @cpaika said, this is a temporary situation. What you can do when this happens is choose from other availability zones like this:
eksctl create cluster --region=us-east-1 --zones=us-east-1a,us-east-1b
I had the same error on the same AZ. It seems that us-east-1e doesn't support AmazonEKS.
UnsupportedAvailabilityZoneException
At least one of your specified cluster subnets is in an Availability Zone that does not support Amazon EKS. The exception output specifies the supported Availability Zones for your account, from which you can choose subnets for your cluster.
Source: https://docs.aws.amazon.com/en_us/eks/latest/APIReference/API_CreateCluster.html
After I removed the us-east-1e subnet from my config, it worked for me.
Hi @martina-if,
I am using the config file to create cluster instead of flags. How can we specify the zones in config file if no existing VPC is there
I'm not sure why this is close, it's still an issue (and I agree with @martina-if it's not eksctl issue) that is failing eksctl from running without stating which zones to run on (we can't exclude right now).
maybe until this is resolved from the AWS side, eksctl can exclude this availability zone?
I love that eksctl spreading randomly each deployment of clusters, it's a great feature but this us-east-1e still breaks the run.
thanks and sorry I'm rising a closed issue, but without stating AZs everyone should get it from time to time.
@Blorby I think the reason why it was closed is because I opened it as a bug but it isn’t viewed as a bug by the team but more of a feature request. So above I was asked to open a feature request but never did. Maybe they would prioritize this as a feature if we created a request to not use availability zones that’s don’t support EKS.
But I do agree it’s still an issue as long as AWS doesn’t support EKS in certain availability zones people will run into this and it would be great if eksctl handled this on its own
Thanks for reporting!
Yeah, as @cpaika has kindly explained, I feel like this isn't an issue in eksctl. A potential U/X enhancement would be tweak the error message eksctl produces, so that it has nothing to do with eksctl.
I'm closing as not a bug. But please feel free to submit a feature request if necessary 🙏
Just to make sure I understand, the feature request is something like "eksctl should only select availability zones that support EKS and not all listed availability zones in a region" right?
But I think this issue #905 (https://github.com/weaveworks/eksctl/issues/905) is filling for that...
I've up-voted this feature request, but I don't think there's more AZs with this issue, so maybe just remove this region manually to avoid getting this error every time someone is calling eksctl create cluster --region us-east-1 and eksctl using us-east-1e.
Most helpful comment
Hi @jrusso1020 , thank you for the report. As @cpaika said, this is a temporary situation. What you can do when this happens is choose from other availability zones like this: