Deleting your Amazon Elastic Kubernetes Service cluster
You can delete your cluster by running the following command, making sure to replace the cluster name with that of your own:
$ eksctl delete cluster --name hilarious-wardrobe-1717847351
Deleting the cluster takes less time to run than when we launched it; in fact, it takes around 5 minutes.
As before, eksctl
gives you details on what it is doing as it deletes the resources:
[i] deleting EKS cluster "hilarious-wardrobe-1717847351"
[i] will drain 0 unmanaged nodegroup(s) in cluster "hilarious-wardrobe-1717847351"
[i] starting parallel draining, max in-flight of 1
[i] deleted 0 Fargate profile(s)
The first thing that is updated is the local kubectl configuration, as we can see here:
[✔] kubeconfig has been updated
Then, any resources that have been launched as part of deploying workloads into our cluster are terminated:
[i] cleaning up AWS load balancers created...