Difference between revisions of "Eksctl create cluster"

From wikieduonline
Jump to navigation Jump to search
 
(45 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 +
[[eksctl create]] cluster
 +
 +
[[eksctl create cluster --asg-access]]
  
 +
https://eksctl.io/usage/creating-and-managing-clusters/
 +
 +
== Examples ==
 
  [[eksctl create]] cluster
 
  [[eksctl create]] cluster
 +
eksctl create cluster 'your-sample-cluster' --spot --instance-types=[[t3.small]]
 +
 +
Cluster will be created but you will face [[MemoryPressure]] errors when running [[pods]].
 +
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
 
  eksctl create cluster -f cluster.yaml
 +
It will create one managed <code>[[nodegroup]]</code> containing two <code>[[m5.large]]</code> nodes
 +
 +
eksctl create cluster --spot --instance-types=[[t3.nano]]
 +
eksctl create cluster --spot [[--instance-types]]=[[c3.large]],[[c4.large]],[[c5.large]]
 +
 +
 +
[[envsubst]] < cluster-config.yaml | [[eksctl create cluster -f]] - <ref>https://aws.amazon.com/blogs/containers/start-pods-faster-by-prefetching-images/</ref>
 +
 +
 +
eksctl create cluster 'your-sample-cluster' --zones [[us-east-1a]],us-east-1b,us-east-1c
 +
(It will take approximately 20 minutes to finish)
  
 +
eksctl create cluster \
 +
--name your-cluster-name \
 +
--version 1.21 \
 +
[[--nodegroup-name]] standard-workers \
 +
--node-type t5.large \
 +
--nodes 6 \
 +
--nodes-min 5 \
 +
--nodes-max 8 \
 +
--[[alb-ingress-access]]
  
2021-11-12 20:43:10 [ℹ]  eksctl version 0.73.0
+
== [[eksctl create cluster execution examples]] ==
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]
+
== [[eksctl create cluster output with errors]] ==
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 ==
 
== Related ==
 
* <code>[[aws eks create-cluster]]</code>
 
* <code>[[aws eks create-cluster]]</code>
 +
* <code>[[eksctl delete cluster]]</code>
 +
* <code>[[aws cloudformation list-stacks]] | grep StackName</code>
 
* <code>[[aws cloudformation describe-stack-events --stack-name]] your_stack_name | grep -A1 CREATE_FAILED</code>
 
* <code>[[aws cloudformation describe-stack-events --stack-name]] your_stack_name | grep -A1 CREATE_FAILED</code>
 
* <code>[[m5.large]]</code>, [[AWS Nitro System]]
 
* <code>[[m5.large]]</code>, [[AWS Nitro System]]
 +
 +
* <code>[[eksctl get cluster]]</code>
 +
* <code>[[kubectl get nodes]]</code>
 +
* <code>[[kubectl cluster-info]]</code>
 +
* <code>[[eksctl create nodegroup]]</code>
 +
* <code>[[eksctl utils describe-stacks]]</code>
 +
* <code>[[eksctl utils update-cluster-logging]]</code>
 +
* [[Kubernetes installation]]
 +
* [[ServiceRoleARN]]
 +
* <code>[[kops create cluster]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{eksctl create}}
 
* {{eksctl}}
 
* {{eksctl}}
 +
* {{K8s installation}}
  
 
[[Category:eksctl]]
 
[[Category:eksctl]]

Latest revision as of 12:48, 13 May 2023

eksctl create cluster

eksctl create cluster --asg-access

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

Examples[edit]

eksctl create cluster
eksctl create cluster 'your-sample-cluster' --spot --instance-types=t3.small

Cluster will be created but you will face MemoryPressure errors when running pods.

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


envsubst < cluster-config.yaml | eksctl create cluster -f - [1]


eksctl create cluster 'your-sample-cluster' --zones us-east-1a,us-east-1b,us-east-1c
(It will take approximately 20 minutes to finish)
eksctl create cluster \
--name your-cluster-name \
--version 1.21 \
--nodegroup-name standard-workers \
--node-type t5.large \
--nodes 6 \
--nodes-min 5 \
--nodes-max 8 \
--alb-ingress-access

eksctl create cluster execution examples[edit]

eksctl create cluster output with errors[edit]

Related[edit]

See also[edit]

  • https://aws.amazon.com/blogs/containers/start-pods-faster-by-prefetching-images/
  • Advertising: