eksctl-io / eksctl

The official CLI for Amazon EKS
https://eksctl.io
Other
4.93k stars 1.41k forks source link

Create an eksctl deployment file (eksworkshop.yaml) use in creating your cluster using the following syntax: #4832

Closed Iamtoluakin closed 2 years ago

Iamtoluakin commented 2 years ago
cat << EOF > eksworkshop.yaml
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: eksworkshop-eksctl
  region: ${AWS_REGION}
  version: "1.19"

availabilityZones: ["${AZS[0]}", "${AZS[1]}", "${AZS[2]}"]

managedNodeGroups:
- name: nodegroup
  desiredCapacity: 3
  instanceType: t3.small
  ssh:
    enableSsm: true

# To enable all of the control plane logs, uncomment below:
# cloudWatch:
#  clusterLogging:
#    enableTypes: ["*"]

secretsEncryption:
  keyARN: ${MASTER_ARN}
EOF

This is what I got

Iamadmin:~/environment $ eksctl create cluster -f eksworkshop.yaml 2022-02-23 17:27:26 [!] SSM is now enabled by default; ssh.enableSSM is deprecated and will be removed in a future release 2022-02-23 17:27:26 [ℹ] eksctl version 0.84.0 2022-02-23 17:27:26 [ℹ] using region us-east-2 2022-02-23 17:27:26 [ℹ] subnets for - public:192.168.0.0/19 private:192.168.96.0/19 2022-02-23 17:27:26 [ℹ] subnets for - public:192.168.32.0/19 private:192.168.128.0/19 2022-02-23 17:27:26 [ℹ] subnets for - public:192.168.64.0/19 private:192.168.160.0/19 2022-02-23 17:27:26 [ℹ] nodegroup "nodegroup" will use "" [AmazonLinux2/1.19] 2022-02-23 17:27:26 [ℹ] using Kubernetes version 1.19 2022-02-23 17:27:26 [ℹ] creating EKS cluster "eksworkshop-eksctl" in "us-east-2" region with managed nodes 2022-02-23 17:27:26 [ℹ] 1 nodegroup (nodegroup) was included (based on the include/exclude rules) 2022-02-23 17:27:26 [ℹ] will create a CloudFormation stack for cluster itself and 0 nodegroup stack(s) 2022-02-23 17:27:26 [ℹ] will create a CloudFormation stack for cluster itself and 1 managed nodegroup stack(s) 2022-02-23 17:27:26 [ℹ] if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-east-2 --cluster=eksworkshop-eksctl' 2022-02-23 17:27:26 [ℹ] Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "eksworkshop-eksctl" in "us-east-2" 2022-02-23 17:27:26 [ℹ] CloudWatch logging will not be enabled for cluster "eksworkshop-eksctl" in "us-east-2" 2022-02-23 17:27:26 [ℹ] you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-east-2 --cluster=eksworkshop-eksctl' 2022-02-23 17:27:26 [ℹ]
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-02-23 17:27:26 [ℹ] building cluster stack "eksctl-eksworkshop-eksctl-cluster" 2022-02-23 17:27:26 [!] 1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console 2022-02-23 17:27:26 [ℹ] to cleanup resources, run 'eksctl delete cluster --region=us-east-2 --name=eksworkshop-eksctl' 2022-02-23 17:27:26 [✖] insufficient number of subnets, at least 2x public and/or 2x private subnets are required Error: failed to create cluster "eksworkshop-eksctl"

Please help

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.

cPu1 commented 2 years ago

@Iamtoluakin, you have not set the AZS array that is passed to availabilityZones. Retry the command after supplying valid values for availabilityZones and it will work.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

cPu1 commented 2 years ago

@Iamtoluakin, you have not set the AZS array that is passed to availabilityZones. Retry the command after supplying valid values for availabilityZones and it will work.

Closing due to inactivity, please feel free to open a new issue if you have more questions.