Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] After deleting a cluster from the command line, creating a cluster with the same name from the command line will sometimes fail #7718

Open
jwatte opened this issue Apr 22, 2024 · 2 comments

Comments

@jwatte
Copy link

jwatte commented Apr 22, 2024

What were you trying to accomplish?

Try to create a cluster from the command line with the same name as a previously deleted cluster.

What happened?

After this, I'm trying to re-create a cluster with the same name, but get the error:

creating CloudFormation stack "eksctl-jwatte-cluster-cluster": operation error CloudFormation: CreateStack, https response error StatusCode: 400, RequestID: 2966a9ad-f4e4-4ab6-847f-2962e762e982, AlreadyExistsException: Stack [eksctl-jwatte-cluster-cluster] already exists

How to reproduce it?

I create a cluster.
I wait for it to come up.
I apply nginx-ingress manifests to set up an ingress controller and a NLB.
I wait for that to come up.
I delete the cluster.
The cluster goes away, and eksctl says the cluster is deleted.

Anything else we need to know?
Bug #2014 reports this same problem, and documents a work-around that involves the web console.
However, the whole point of eksctl is to drive this process from the command line, suitable for automated processes.
Thus, the work-around is not a solution to the problem, and an open bug needs to exist to document this problem.

Possible solutions would be:

  1. make it possible for eksctl to re-use the existing cloudformation template from the command line
  2. make it possible to force-delete (or diagnose-and-fix) the cloudformation deletion from the command line

Versions

$ eksctl info
eksctl version: 0.175.0
kubectl version: v1.30.0
OS: darwin
$
Copy link
Contributor

Hello jwatte 👋 Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-5 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

@jwatte jwatte changed the title [Bug] After deleting a cluster, re-creating a cluster with the same name will sometimes fail [Bug] After deleting a cluster from the command line, creating a cluster with the same name from the command line will sometimes fail Apr 22, 2024
@TiberiuGC
Copy link
Collaborator

Hi @jwatte , by default, eksctl will delete the cluster's cloudformation stack asynchronously. Running the eksctl delete cluster command with --wait flag should reveal if an error occurs during cluster stack deletion process.

Could you also please check AWS Console and share the actual error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants