- Newest
- Most votes
- Most comments
Unfortunately, once an EKS cluster is deleted, the control plane cannot be recovered. When you delete an EKS cluster using either the AWS CLI's delete-cluster command or eksctl delete cluster, the control plane is permanently removed.
However, since you mentioned you had self-managed node groups with persistent data, there might be a way to preserve your data while creating a new cluster:
-
If your EC2 instances from the self-managed node group are still running (since they're not automatically terminated when deleting just the EKS control plane), you may be able to preserve the data on those instances.
-
You'll need to create a new EKS cluster with the same configuration as your previous one:
- Use the same VPC and subnet configuration
- Create it with the same Kubernetes version
- Configure the same IAM roles and permissions
- After creating the new cluster, you'll need to create a new self-managed node group:
- Use the
eksctl create nodegroupcommand with the--managed=falseflag - Ensure the bootstrap script in the UserData contains the correct new EKS cluster name
- If your data is stored on persistent volumes like EFS, you may be able to reconnect those volumes to your new cluster.
The key challenge will be reconfiguring all the Kubernetes resources (deployments, services, etc.) that were in your original cluster, as those configurations are lost when the control plane is deleted. If you have your Kubernetes manifests or Helm charts backed up, you can use those to redeploy your applications.
For future reference, it's recommended to:
- Use infrastructure as code tools to define your cluster
- Back up your Kubernetes manifests and configurations
- Consider using tools like Velero for Kubernetes backup and restore
Sources
Community | Creating a EKS cluster 1.24 version from scratch using eksctl.
Unmanaged nodegroups - Eksctl User Guide
EKS node creation failed | AWS re:Post
Use DeleteCluster with an AWS SDK or CLI - AWS SDK Code Examples
Relevant content
- asked 2 years ago
- asked 3 years ago
- asked 8 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
