2

I'm trying to create a cluster on EKS by the existing vpc of kops cluster in EC2 like below.

eksctl create cluster \
--name eks-cluster \
--version 1.18 \
--region us-east-1 \
--vpc-from-kops-cluster kops-cluster \
--fargate

but I faced the error that the cluster couldn't have one of the subnets located in us-east-1c where kops-cluster has three subnets us-east-1c, us-east-1b, us-east-1a.

AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Cannot create cluster 'eks-cluster' because us-east-1c, 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-1d, us-east-1e, us-east-1f (Service: AmazonEKS; Status Code: 400; Error Code: UnsupportedAvailabilityZoneException; Request ID: 8c5242ee-2e37-4f2b-98cd-c52cb2bbf523; Proxy: null)"

I'm trying to find a workaround to accomplish making a cluster within the existing vpc in a simple way.

sunsets
  • 401
  • 5
  • 23

1 Answers1

0

That mean you should specify zones for your cluster creation.

eksctl create cluster \
--name eks-cluster \
--version 1.18 \
--region us-east-1 \
--zones=us-east-1a,us-east-1b,us-east-1d,us-east-1e,us-east-1f \ 
--vpc-from-kops-cluster kops-cluster \
--fargate
Thanh Nguyen Van
  • 10,292
  • 6
  • 35
  • 53
  • I've already tried exactly same as you and it didn't work with the weird message too. `[✖] only one argument is allowed to be used as a name` – sunsets Jan 15 '21 at 03:29
  • `--zones us-east-1a,us-east-1b,us-east-1d,us-east-1e,us-east-1f ` without `=` try please – Thanh Nguyen Van Jan 15 '21 at 03:30
  • ah I had a white space between zones. But still has `Error: --vpc-from-kops-cluster and --zones cannot be used at the same time` :( – sunsets Jan 15 '21 at 03:30
  • Maybe we all know that it's because the new cluster try to use the existing subnets including `us-east-1c` – sunsets Jan 15 '21 at 03:31