Open
Description
What were you trying to accomplish?
Use eksctl to create a nodegroup with capacity block reservation.
BTW, great to have this feature at #8207
What happened?
The cloudformation template created by eksctl doesn't contain CapacityReservationId field.
How to reproduce it?
Use following commands to reproduce (But I think it might be difficult to have a real CapacityReservationId for dev team to debug)
## Change to your own
VPCID="vpc-123456789012"
SUBNET="subnet-123456789012"
CLUSTER_NAME="test-cluster"
AWS_DEFAULT_REGION="ap-southeast-3" # not sure if it's region related, so keep to my problem region
K8S_VERSION="1.32"
cat << EOF > al2-gpu-p5en.48xlarge-nodegroup.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ${CLUSTER_NAME}
region: ${AWS_DEFAULT_REGION}
managedNodeGroups:
- name: p5en-ng-efa-al2
instanceType: p5en.48xlarge
amiFamily: AmazonLinux2
privateNetworking: true
efaEnabled: true
capacityReservation:
capacityReservationTarget:
capacityReservationId: "cr-1234567890" # Replace with a real Capacity Block ID
instanceMarketOptions:
marketType: capacity-block
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
desiredCapacity: 1
minSize: 1
maxSize: 1
volumeSize: 200
tags:
"eks/node-type": "gpu"
labels:
eks/node-type: gpu
eks/gpu-type: nvidia
nvidia.com/gpu.present: "true"
taints:
- key: nvidia.com/gpu
effect: "NoSchedule"
subnets:
- ${SUBNET}
ssh: # use existing EC2 key
publicKeyName: testkey
EOF
The cloudformation template created by eksctl is just like this, missing CapacityReservationId field, which makes the stack failed
{
...
"LaunchTemplate": {
"Type": "AWS::EC2::LaunchTemplate",
"Properties": {
"LaunchTemplateData": {
...
"CapacityReservationSpecification": {
"CapacityReservationTarget": {}
},
...
...
}
I have to download the template, edit it and create a new one.
Logs
Anything else we need to know?
Versions
$ eksctl info
eksctl version: 0.206.0
kubectl version: v1.32.0-eks-5ca49cb
OS: linux