A DELETE_FAILED CloudFormation stack blocks eksctl create cluster
1 min read
Ran eksctl create cluster --name sandbox and it failed instantly:
creating CloudFormation stack "eksctl-sandbox-cluster": AlreadyExistsException:
Stack [eksctl-sandbox-cluster] already existsThe cluster itself didn't exist — aws eks describe-cluster returned nothing. But a CloudFormation stack from a previous failed deletion was stuck in DELETE_FAILED state.
# Check the orphaned stack
aws cloudformation describe-stacks --stack-name eksctl-sandbox-cluster \
--query 'Stacks[0].StackStatus'
# "DELETE_FAILED"
# Manually delete it
aws cloudformation delete-stack --stack-name eksctl-sandbox-cluster
aws cloudformation wait stack-delete-complete --stack-name eksctl-sandbox-clusterAfter cleaning up the stack, eksctl create cluster worked fine. eksctl generates stack names as eksctl-{name}-cluster, so this trap is easy to hit when recreating a cluster with the same name.
