aws-samples / eks-workshop

AWS Workshop for Learning EKS
https://eksworkshop.com
MIT No Attribution
803 stars 1.24k forks source link

eksctl create cluster fails due to insufficient number of subnets #1417

Closed spereverziev closed 2 years ago

spereverziev commented 2 years ago

Hi, I am following the workshop, and currently stuck on Launching EKS steps. It fails with insufficient number of subnets, at least 2x public and/or 2x private subnets are required. Here is the output:

~/environment $ eksctl create cluster -f eksworkshop.yaml
2022-06-01 00:59:21 [!]  SSM is now enabled by default; `ssh.enableSSM` is deprecated and will be removed in a future release
2022-06-01 00:59:21 [ℹ]  eksctl version 0.99.0
2022-06-01 00:59:21 [ℹ]  using region us-west-2
2022-06-01 00:59:21 [ℹ]  subnets for  - public:192.168.0.0/19 private:192.168.96.0/19
2022-06-01 00:59:21 [ℹ]  subnets for  - public:192.168.32.0/19 private:192.168.128.0/19
2022-06-01 00:59:21 [ℹ]  subnets for  - public:192.168.64.0/19 private:192.168.160.0/19
2022-06-01 00:59:21 [ℹ]  nodegroup "nodegroup" will use "" [AmazonLinux2/1.19]
2022-06-01 00:59:21 [ℹ]  using Kubernetes version 1.19
2022-06-01 00:59:21 [ℹ]  creating EKS cluster "eksworkshop-eksctl" in "us-west-2" region with managed nodes
2022-06-01 00:59:21 [ℹ]  1 nodegroup (nodegroup) was included (based on the include/exclude rules)
2022-06-01 00:59:21 [ℹ]  will create a CloudFormation stack for cluster itself and 0 nodegroup stack(s)
2022-06-01 00:59:21 [ℹ]  will create a CloudFormation stack for cluster itself and 1 managed nodegroup stack(s)
2022-06-01 00:59:21 [ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-west-2 --cluster=eksworkshop-eksctl'
2022-06-01 00:59:21 [ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "eksworkshop-eksctl" in "us-west-2"
2022-06-01 00:59:21 [ℹ]  CloudWatch logging will not be enabled for cluster "eksworkshop-eksctl" in "us-west-2"
2022-06-01 00:59:21 [ℹ]  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-west-2 --cluster=eksworkshop-eksctl'
2022-06-01 00:59:21 [ℹ]  
2 sequential tasks: { create cluster control plane "eksworkshop-eksctl", 
    2 sequential sub-tasks: { 
        wait for control plane to become ready,
        create managed nodegroup "nodegroup",
    } 
}
2022-06-01 00:59:21 [ℹ]  building cluster stack "eksctl-eksworkshop-eksctl-cluster"
2022-06-01 00:59:21 [!]  1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2022-06-01 00:59:21 [ℹ]  to cleanup resources, run 'eksctl delete cluster --region=us-west-2 --name=eksworkshop-eksctl'
2022-06-01 00:59:21 [✖]  insufficient number of subnets, at least 2x public and/or 2x private subnets are required
~/environment $ eksctl version
0.99.0
ROunofF commented 2 years ago

Sorry I cannot reproduce this issue. Check the availabilityZones: ["us-west-2a", "us-west-2b", "us-west-2c"] line inside your eksworkshop.yaml...

If needed, provide the eksworkshop.yaml file