Delete eks cluster

please share procedure to delete EKS cluster

Procedure to Deleting an Amazon EKS cluster

  1. Delete stage variable created by stage job
  2. move the existing namespaces from global and regional cluster to ew cluster , for that
    1. remove vpc links with commad ‘aws apigateway get-vpc-links | jq -r ‘.items[] | select(.name | contains | .id’ | xargs -n1 -I{} aws apigateway delete-vpc-link --vpc-link-id {}’
    2. stop the code pipline for that environment
    3. uninstall helm
    4. helm istall upgrade in ew cluster
  3. delete the service
  4. delete load balancer
  5. daemon set configured while creting cluster will deleted along with deletion
  6. delete cluster using eksctl delete cluster --name OR aws eks delete-cluster --name
  7. kubectl delete svc service-name , along with services that have an associated EXTERNAL-IP value
  8. kubectl get svc --all-namespaces and kubectl get --all
  9. check the services in aws console , for EKS , VPC , LB

Hello @jainsakshidevopsaws
Thanks for sharing!

no i am searching for procedure

Hi @jainsakshidevopsaws,

Please follow official document from AWS: Deleting an Amazon EKS cluster - Amazon EKS

Thanks,
Trung.

As best practice you should always provision infrastructure using IaC (CloudFormation or Terraform).
Then, when yo do want to delete it, it will all be deleted and in the correct order.

1 Like