Here is how to delete the EKS Cluster you’ve provisioned:
In the command line, check out all the namespaces that are attached to your EKS cluster:
kubectl get svc --all-namespaces
Delete any services that has an associated EXTERNAL-IP value
# These services are fronted by an ELB which must be deleted for associated resources to be released properly
kubectl delete svc <service-name>
Delete the EKS cluster with the code snippet below:
# If you named your EKS cluster something other than basic-eks, replace the basic-eks below with the name used
eksctl delete cluster --name basic-eks
This process may take up to 30 minutes for everything to be fully deleted.
Now that we’ve deleted the EKS cluster, we can now safely delete our Cloud9 EC2 instance: