wesupport

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Cannot Delete Amazon EKS cluster

by | Sep 4, 2021

Recently, one of our customers found it difficult to delete their Amazon EKS cluster. Luckily for them, at Bobcares, we assist different AWS queries as a part of our AWS Support Services. Let’s take a look at how the support team resolved this particular issue.

How To Delete Amazon EKS Cluster?

In order to completely delete an Amazon EKS cluster, you need to delete the Amazon EKS control plane as well as the data plane. In some cases, you will have to remove the worker nodes as well. Additionally, you need to remove the cluster via the same tool used to create the cluster.

Furthermore, removing Ingress resources and Kubernetes services deleted the load balancer from the particular account. If you create the load balancer via the AWS Management Console, it should be either manually deleted or removed from Kubernetes.

How to proceed if you cannot delete the Amazon EKS Cluster

Our Support Techs offer three approaches based on the scenario.

  • If you receive an error message stating “The following resource(s) failed to delete” or “resource XXXXXXX has a dependent object” when you attempt to delete the cluster, proceed to How To Delete AWSCloudFormation stack responsible for the Cluster Component.
  • In case the nodes are alive even after the cluster is deleted, proceed to How to Delete Auto Scaling group used for creating worker nodes. In most cases, the issue arises due to unmanaged worker nodes in relation to the cluster which is a part of the AWS CloudFormation stack.
  • Does the cluster appear frozen in the DELETING stage for a longer duration? Then check whether a missing Access Management(IAM) policy or AWS Identity is responsible for preventing the deletion of the cluster. In case the IAM is absent, proceed to How to recreate IAM service for EKS section.

Please note that a cluster will take time to delete in normal circumstances. As per the rules, you are not charged for a cluster in the DELETING stage.

How To Delete AWSCloudFormation Stack Responsible for the Cluster Component

1.    In case the stack is still present due to dependencies, you need to manually remove the resources that may have dependencies, or even remove the dependencies. Next, attempt to stack deletion again.

If you prefer to hold on to the resource that refuses to be deleted, then skip over the resources when you choose to delete the stack. However, this works only on stacks or resources that are currently in DELETE_FAILED state.

Although the skipped resources are active, the AWS CloudFormation stack will be successfully deleted. After that, you may choose to delete the resources via the AWS Management Console.

2.    After the stack is deleted, attempt to delete the cluster.

In case the stack fails to delete or is slow to delete, review the DeleteCluster API call present in AWS CloudTrail.

How To Delete Auto Scaling Group Used for Creating Worker Nodes

1.    First, track the stack where the AWS CloudFormation worker node returned the error. Then delete this stack. In other words, it deletes the Auto Scaling group as it is a part of the stack. Additionally, you can find the name of the stack in the instance tag in the form: aws:cloudformation:stack-name.

2. Check if the Auto Scaling group is deleted or not. If not, go ahead and delete it.

How to Recreate IAM Service Role for Amazon EKS

An IAM service role that allows EKS to place calls to other AWS services is essential. In case you modify or delete the role, the cluster fails to delete resources. For instance, the elastic network or the load balancer.

1.    Create the IAM role again. Set Amazon EKS as the service responsible for managing clusters on your behalf. After that, recreate the IAM once again.

2. Next, attach the AmazonEKSClusterPolicy and AmazonEKSServicePolicy manage policies to the IAM role.

[Need assistance with EKS? AWS Support Services is just a click away!]

Conclusion

In short, our support services can handle different challenges brought forth by AWS like being unable to delete the Amazon EKS cluster.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags