Difference between revisions of "Eksctl create cluster"

From wikieduonline
Jump to navigation Jump to search
Line 70: Line 70:
 
* <code>[[eksctl create nodegroup]]</code>
 
* <code>[[eksctl create nodegroup]]</code>
 
* <code>[[eksctl utils describe-stacks]]</code>
 
* <code>[[eksctl utils describe-stacks]]</code>
 +
* <code>[[eksctl utils update-cluster-logging]]
  
 
== See also ==
 
== See also ==

Revision as of 16:20, 28 November 2021

https://eksctl.io/usage/creating-and-managing-clusters/

Examples:

eksctl create cluster
eksctl create cluster 'your-sample-cluster' --spot --instance-types=t3.nano
eksctl create cluster 'your-sample-cluster' --zones us-east-1a,us-east-1b,us-east-1c
eksctl create cluster -f cluster.yaml

It will create one managed nodegroup containing two m5.large nodes

eksctl create cluster --spot --instance-types=t3.nano
eksctl create cluster --spot --instance-types=c3.large,c4.large,c5.large


eksctl create cluster 'your-sample-cluster' --zones us-east-1a,us-east-1b,us-east-1c
(It will take approximately 20 minutes to finish)

Output:

2021-11-12 20:43:10 [ℹ]  eksctl version 0.73.0
2021-11-12 20:43:10 [ℹ]  using region us-east-1
2021-11-12 20:43:11 [ℹ]  setting availability zones to [us-east-1e us-east-1f]
2021-11-12 20:43:11 [ℹ]  subnets for us-east-1e - public:192.168.0.0/19 private:192.168.64.0/19
2021-11-12 20:43:11 [ℹ]  subnets for us-east-1f - public:192.168.32.0/19 private:192.168.96.0/19
2021-11-12 20:43:11 [ℹ]  nodegroup "ng-a832f99e" will use "" [AmazonLinux2/1.21]
2021-11-12 20:43:11 [ℹ]  using Kubernetes version 1.21
2021-11-12 20:43:11 [ℹ]  creating EKS cluster "wonderful-sheepdog-1636746186" in "us-east-1" region with managed nodes
2021-11-12 20:43:11 [ℹ]  will create 2 separate CloudFormation stacks for cluster itself and the initial managed nodegroup
2021-11-12 20:43:11 [ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-east-1 --cluster=wonderful-sheepdog-1636746186'
2021-11-12 20:43:11 [ℹ]  CloudWatch logging will not be enabled for cluster "wonderful-sheepdog-1636746186" in "us-east-1"
2021-11-12 20:43:11 [ℹ]  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-east-1 --cluster=wonderful-sheepdog-1636746186'
2021-11-12 20:43:11 [ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "wonderful-sheepdog-1636746186" in "us-east-1"
2021-11-12 20:43:11 [ℹ]
2 sequential tasks: { create cluster control plane "wonderful-sheepdog-1636746186",
    2 sequential sub-tasks: {
        wait for control plane to become ready,
        create managed nodegroup "ng-a832f99e",
    }
}
2021-11-12 20:43:11 [ℹ]  building cluster stack "eksctl-wonderful-sheepdog-1636746186-cluster"
2021-11-12 20:43:12 [ℹ]  deploying stack "eksctl-wonderful-sheepdog-1636746186-cluster"
2021-11-12 20:43:42 [ℹ]  waiting for CloudFormation stack "eksctl-wonderful-sheepdog-1636746186-cluster"
2021-11-12 20:44:13 [ℹ]  waiting for CloudFormation stack "eksctl-wonderful-sheepdog-1636746186-cluster"
2021-11-12 20:44:14 [✖]  unexpected status "ROLLBACK_IN_PROGRESS" while waiting for CloudFormation stack "eksctl-wonderful-sheepdog-1636746186-cluster"
2021-11-12 20:44:14 [ℹ]  fetching stack events in attempt to troubleshoot the root cause of the failure
2021-11-12 20:44:14 [✖]  AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EC2::NatGateway/NATGateway: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPrivateUSEAST1F: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EC2::Route/PublicSubnetRoute: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EC2::SubnetRouteTableAssociation/RouteTableAssociationPublicUSEAST1E: CREATE_FAILED – "Resource creation cancelled"
2021-11-12 20:44:14 [✖]  AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Resource handler returned message: \"Cannot create cluster 'wonderful-sheepdog- 
1636746186' 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: Eks, Status Code: 400, Request ID: 0a041b95-8225-4e1e-a637- 
c8fbf6ecedf3, Extended Request ID: null)\" (RequestToken: xxxxecbbd-b6de-xxx-e1d5-c0e5a40b2569, HandlerErrorCode: InvalidRequest)"
2021-11-12 20:44:14 [!]  1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2021-11-12 20:44:14 [ℹ]  to cleanup resources, run 'eksctl delete cluster --region=us-east-1 --name=wonderful-sheepdog-1636746186'
2021-11-12 20:44:14 [✖]  ResourceNotReady: failed waiting for successful resource state
Error: failed to create cluster "wonderful-sheepdog-1636746186"

Related

See also

Advertising: