How Do You Delete a Kubernetes Cluster in AWS?

Problem scenario
You try to manually delete EC-2 instances (both worker nodes and the master node of Kubernetes), but this does not work. The EC-2 instances are re-created. How do you delete the cluster?

Solution
Prerequisite
Install and configure the AWS CLI; if you need assistance, see this posting.

Procedures
Run these three commands but substitute "contint.k8s.local" with the name of your cluster:

export KOPS_CLUSTER_NAME=contint.k8s.local
export KOPS_STATE_STORE=s3://$KOPS_CLUSTER_NAME-state
kops delete cluster --name contint.k8s.local --yes

Leave a comment

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