deleteCluster
Deletes an Amazon EKS cluster control plane.
If you have active services in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a cluster in the Amazon EKS User Guide.
If you have managed node groups or Fargate profiles attached to the cluster, you must delete them first. For more information, see DeleteNodgroup
and DeleteFargateProfile
.
Samples
fun main() {
//sampleStart
// This example command deletes a cluster named devel in your default region.
val resp = eksClient.deleteCluster {
name = "devel"
}
//sampleEnd
}