Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 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 *

Reviews

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF