3

我正在尝试通过 eksctl 创建一个集群,使用默认选项,以及使用“AdministratorAccess”的 AMI 用户,我被困在“等待 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"

我尝试了不同的地区,遇到了同样的问题。

4

2 回答 2

9

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

于 2021-03-15T05:58:13.163 回答
0

我总是手动创建 CloudFormation 堆栈,然后在 eksctl create cluster命令期间选择它。为确保您没有错过任何步骤 - 请参阅使用 Amazon EKS 部署 Kubernetes 集群的精彩文章,其中包含分步说明。或任何官方文档。


为 EKS 创建 VPC

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

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

在选择模板页面上,在相关部分输入 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.
于 2021-01-18T16:09:43.870 回答