eksctl delete cluster not works

Created on 10 May 2019  Â·  8Comments  Â·  Source: weaveworks/eksctl

Hello

I just create a cluster

eksctl create cluster  --name mario-cluster ....

Then I try to remove it

~ eksctl delete cluster mario-cluster                           
[ℹ]  using region us-east-1
[ℹ]  deleting EKS cluster "mario-cluster"
[✖]  no eksctl-managed CloudFormation stacks found for "mario-cluster"

I look into CloudFormation, I see "eksctl-mario-cluster-cluster", so I try

~ eksctl delete cluster eksctl-mario-cluster-cluster   
[ℹ]  using region us-east-1
[ℹ]  deleting EKS cluster "eksctl-mario-cluster-cluster"
[✖]  no eksctl-managed CloudFormation stacks found for "eksctl-mario-cluster-cluster"

Is it a bug ?

awaiting more information

Most helpful comment

Hi. If you are not using your default region, then you need to specify, for both get and `delete.

eksctl get cluster [--name=<name>] [--region=<region>]

All 8 comments

Hi @mmaryo, which region did you use when you created the cluster? What happens if you run eksctl get clusters?

Feel free to reach us on slack :)

➜ ~ eksctl get clusters
NAME REGION
dev us-east-1
prod us-east-1

And I create cluster in ap-south-1

Where does eksctl find regions and clusters ?

Thanks for Slack, i'm coming @martina-if
edit : how to sign up ?

Hi. If you are not using your default region, then you need to specify, for both get and `delete.

eksctl get cluster [--name=<name>] [--region=<region>]

thanks it works

➜  ~ eksctl delete cluster --name=mario-test-2 --region=ap-south-1
[ℹ]  using region ap-south-1
[ℹ]  deleting EKS cluster "mario-test-2"
[✔]  kubeconfig has been updated
[ℹ]  2 sequential tasks: { delete nodegroup "ng-d6dd6593", delete cluster control plane "mario-test-2" 
[async] }
[ℹ]  will delete stack "eksctl-mario-test-2-nodegroup-ng-d6dd6593"
[ℹ]  waiting for stack "eksctl-mario-test-2-nodegroup-ng-d6dd6593" to get deleted
[ℹ]  will delete stack "eksctl-mario-test-2-cluster"
[✔]  all cluster resources were deleted

However deletion of CloudFormation failed as you can see on picture

Screenshot 2019-05-13 13:56:00

Probably some dependent resource has been created that blocks the stack delete, you’d have to check CloudFormation events to see what.

I have similar issue on the delete stack. Have found that the cloudformation tear down always fails on gateway / vpc subnet deletion due to a dependancy. This is due to the loadbalancer not being deleted. If you manually delete the ELB then the CF script picks up again and deletes the VPC, ENI, Subnets and SGs.

Using [ℹ] version.Info{BuiltAt:"", GitCommit:"", GitTag:"0.1.33"}

Screenshot 2019-06-05 at 23 37 55
Screenshot 2019-06-05 at 23 40 32

I am closing this since it's from a very old version of eksctl. @Daddy-Badger @mmaryo if you are still having issues the workaround is to delete the AWS resources in the right order taking into account the dependencies between them (first the gateway, then the VPC and then the cluster stack). Feel free to reopen it if you still see this issue with eksctl 0.12.0+.

Loadbalancer issue is resolved in the new version of eksctl. Unforunately, a mounted EFS volume blocks the removal as well. As this has nothing to do with eksctl, but instead is an issue with cloudformation's removal policy, I do not believe that reopening this issue is appropiate.\

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albertmichaelj picture albertmichaelj  Â·  3Comments

xakraz picture xakraz  Â·  4Comments

brunojcm picture brunojcm  Â·  3Comments

Raduan77 picture Raduan77  Â·  3Comments

errordeveloper picture errordeveloper  Â·  4Comments