Anyone please help ,I'm getting this error "Error: couldn't create cluster provider from options: nodeGroups[0].overrideBootstrapCommand is required when using a custom AMI (nodeGroups[0].ami)" while creating unmanaged node groups using eksctl command
eksctl create nodegroup --config-file=nodegroup.yml
and the node group.yml file is below and the same file is used to create eks clusters before and worked in deifferent env but now in prod getting above error
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: cluster-name
region: ap-south-1
nodeGroups:
- name: worker-public-xlarge-general-v2
instanceType: t2.xlarge
desiredCapacity: 0
minSize: 0
maxSize: 10
privateNetworking: false
ami: auto
labels:
project: general
tags:
k8s.io/cluster-autoscaler/node-template/label/project: general
project: general
ssh:
publicKeyName: prod-cluster-name-key
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::966902025223:policy/staging1-substrate-security-group-substrate-kube-allocate-eip
withAddonPolicies:
autoScaler: true
certManager: true
cloudWatch: true
ebs: true
efs: true
imageBuilder: true
securityGroups:
attachIDs:
# security group which holds exposed ports required by substrate
- sg-0eb7b121e94dca857
- sg-0de4913218a071673
- name: worker-public-xlarge-example-v2
instanceType: t2.xlarge
desiredCapacity: 0
minSize: 0
maxSize: 10
privateNetworking: false
ami: auto
labels:
project: example
tags:
k8s.io/cluster-autoscaler/node-template/label/project: example
project: example
ssh:
publicKeyName: prod-cluster-name-key
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::966902025223:policy/staging1-substrate-security-group-substrate-kube-allocate-eip
withAddonPolicies:
autoScaler: true
certManager: true
cloudWatch: true
ebs: true
efs: true
imageBuilder: true
securityGroups:
attachIDs:
# security group which holds exposed ports required by substrate
- sg-0eb7b121e94dca857
- sg-0de4913218a071673
...nodeGroups[0].overrideBootstrapCommand is required when using a custom AMI (nodeGroups[0].ami)
This is a breaking change starting eksctl version 0.90.0. In your spec, the error is due to
ami: auto
, comment out these lines will do. It doesn't do anything to your spec anyway.