eksctl 创建集群卡住了 "waiting for CloudFormation stack"

eksctl create cluster stuck "waiting for CloudFormation stack"

我正在尝试通过 eksctl 创建集群,使用默认选项,AMI 用户使用“AdministratorAccess”,我卡在“等待 CloudFormation 堆栈”

 > eksctl create cluster --name dev
[ℹ]  eksctl version 0.36.0
[ℹ]  using region us-west-2
[ℹ]  setting availability zones to [us-west-2a us-west-2c us-west-2b]
[ℹ]  subnets for us-west-2a - public:192.168.0.0/19 private:192.168.96.0/19
[ℹ]  subnets for us-west-2c - public:192.168.32.0/19 private:192.168.128.0/19
[ℹ]  subnets for us-west-2b - public:192.168.64.0/19 private:192.168.160.0/19
[ℹ]  nodegroup "ng-fa4af514" will use "ami-0532808ed453f9ca3" [AmazonLinux2/1.18]
[ℹ]  using Kubernetes version 1.18
[ℹ]  creating EKS cluster "dev" in "us-west-2" region with un-managed nodes
[ℹ]  will create 2 separate CloudFormation stacks for cluster itself and the initial nodegroup
[ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-west-2 --cluster=dev'
[ℹ]  CloudWatch logging will not be enabled for cluster "dev" in "us-west-2"
[ℹ]  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=dev'
[ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "dev" in "us-west-2"
[ℹ]  2 sequential tasks: { create cluster control plane "dev", 3 sequential sub-tasks: { no tasks, create addons, create nodegroup "ng-fa4af514" } }
[ℹ]  building cluster stack "eksctl-dev-cluster"
[ℹ]  deploying stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-dev-cluster"

试过不同地区,运行进入同一个问题

我总是手动创建 CloudFormation 堆栈,然后在 eksctl create cluster 命令期间选择它。 为确保您没有错过任何步骤 - 请参阅不错的 Deploying a Kubernetes Cluster with Amazon EKS 文章和分步说明。或者任何官方文档。


为 EKS 创建 VPC

为此,我们将使用 CloudFormation 模板,其中包含用于设置 VPC 的所有必要的 EKS 特定成分。

打开 CloudFormation,然后单击创建新堆栈按钮。

在Select模板页面,在相关部分输入CloudFormation YAML的URL:

https://amazon-eks.s3-us-west-2.amazonaws.com/cloudformation/2019-01-09/amazon-eks-vpc-sample.yaml

为 VPC 命名,保留默认网络配置不变,然后单击下一步。

在“选项”页面上,您可以保留默认选项不变,然后单击“下一步”。

在 Review 页面上,只需点击 Create 按钮即可创建 VPC。

CloudFormation 将开始创建 VPC。 完成后,请务必记下创建的各种值 — SecurityGroups、VpcId 和 SubnetIds。您将在后续步骤中需要这些。


接下来,您可以使用命令创建集群

aws eks --region <region> create-cluster --name <clusterName> --role-arn <EKS-role-ARN> --resources-vpc-config subnetIds=<subnet-id-1>,<subnet-id-2>,<subnet-id-3>,securityGroupIds=<security-group-id>

哪里

subnetIds — a comma-separated list of the SubnetIds values from the AWS CloudFormation output that you generated in the previous step.
security-group-id — the SecurityGroups value from the AWS CloudFormation output that you generated in the previous step.

在 Cloudformation 中创建堆栈需要将近 20 分钟。创建集群时,在Cloudformation控制台查看stack的进度:https://console.aws.amazon.com/cloudformation/home.