aws Verified current stable Not installed? Cloud Infrastructure

Aws / Delete Eks Cluster 1608

Delete Eks Cluster 1608

Deletes an existing EKS cluster.

$
Terminal
aws eks delete-cluster --name <cluster_name>

When To Use

When decommissioning a project or redeploying a new environment in the same VPC.

Pro Tip

Ensure all services (e.g., workloads, node groups) are properly terminated to avoid resource conflicts.

Warning

Destructive operation. Confirm the target path and keep a backup before executing.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
aws eks delete-cluster --name <cluster_name>

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
$ aws eks delete-cluster --name eks-cluster-1608
{
    "cluster": {
        "name": "eks-cluster-1608",
        "status": "DELETING"
    }
}

$ aws eks describe-cluster --name eks-cluster-1608
An error occurred (ResourceNotFoundException) when calling the DescribeCluster operation: Cluster_eks-cluster-1608 not found.

Anatomy of Output

Understanding the result

Deleting Cluster: my-cluster Cluster Action

Indicates the initiation of cluster deletion.

Cluster Status: DELETING Current Status

Current operational status of the cluster during deletion.

Termination in progress... Deletion Progress

Cluster components are being destroyed.

Troubleshooting

Common pitfalls

An error occurred (Resource_in_use) when calling the DeleteCluster operation: Cluster is not empty.

Solution: Ensure all associated resources are cleaned up before deletion.

An error occurred (AccessDeniedException) when calling the DeleteCluster operation: User is not authorized to perform eks:DeleteCluster.

Solution: Verify IAM policies to ensure deletion permissions are granted.

An error occurred (ClusterNotFoundException) when calling the DeleteCluster operation: Cluster not found.

Solution: Confirm that the cluster name entered is correct.

Command Breakdown

What each part is doing

aws
Base Command
The executable that performs this operation. Here it runs Aws before the shell applies any redirect operators.
<cluster_name>
cluster name
The value supplied for cluster name.
--name
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: aws eks delete-cluster --name eks-cluster-1608

  2. Step 2

    Verify the deletion status with: aws eks describe-cluster --name eks-cluster-1608

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.