I tried using the eks.md file you mentioned to create an eks cluster.
But failing with below error.
2023-02-18 17:07:40 [!] AWS::IAM::Policy/PolicyCloudWatchMetrics: DELETE_IN_PROGRESS
2023-02-18 17:07:40 [✖] AWS::IAM::Policy/PolicyELBPermissions: CREATE_FAILED – "Resource creation cancelled"
2023-02-18 17:07:40 [✖] AWS::IAM::Policy/PolicyCloudWatchMetrics: CREATE_FAILED – "Resource creation cancelled"
2023-02-18 17:07:40 [✖] AWS::EKS::Cluster/ControlPlane: CREATE_FAILED – "Resource handler returned message: \"unsupported Kubernetes version (Service: Eks, Status Code: 400, Request ID: 1c6446df-750a-4957-b6b4-ba7e5b08c4d6)\" (RequestToken: 94d92933-313a-85fd-f09b-9f00c36bda33, HandlerErrorCode: InvalidRequest)"
2023-02-18 17:07:40 [!] 1 error(s) occurred and cluster hasn't been created properly, you may wish to check CloudFormation console
2023-02-18 17:07:40 [ℹ] to cleanup resources, run 'eksctl delete cluster --region=us-west-1 --name=eks-ci-cd'
2023-02-18 17:07:40 [✖] ResourceNotReady: failed waiting for successful resource state
Error: failed to create cluster "eks-ci-cd"
My eks-cluster.yml file.
## eksctl create cluster -f eks-cluster.yml
## eksctl delete cluster --region=us-west-1 --name=eks-ci-cd
ApiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-ci-cd
region: us-west-1
vpc:
subnets:
private:
us-west-1a:
id: "subnet-08e614241013a1b28"
us-west-1b:
id: "subnet-048fa8332b34f33ca"
public:
us-west-1a:
id: "subnet-05d50499673619096"
us-west-1b:
id: "subnet-0bfc3e7e632d29609"
nodeGroups:
- name: ng-on-demand
instanceType: t3.large
desiredCapacity: 1
privateNetworking: true
labels:
instance-type: on-demand
availabilityZones: ["us-west-1a", "us-west-1b"]
- name: ng-spot
desiredCapacity: 0
minSize: 0
maxSize: 10
privateNetworking: true
instancesDistribution:
instanceTypes:
[
"m5.large",
"m4.large",
"t3.large",
"m5d.large",
"m5ad.large",
"t3a.large",
]
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 0
spotInstancePools: 6
tags:
k8s.io/cluster-autoscaler/node-template/label/instance-type: spot
availabilityZones: ["us-west-1a", "us-west-1b"]
labels:
instance-type: spot
iam:
withAddonPolicies:
autoScaler: true