EKS Cluster Provisioning¶
Quickly spin up and tear down EKS clusters for development and testing using the k8s-automation repository.
Prerequisites¶
- AWS CLI configured with valid credentials (see AWS SSO Setup)
eksctlinstalled (installation guide)- Sufficient AWS permissions (engineer or admin access)
Create a Cluster¶
-
Clone the repository:
-
Run the provisioning script:
-
Enter a name when prompted:
The script will:
- Verify the cluster name doesn't already exist
- Create an EKS cluster in us-east-1 using eksctl
- Generate a cleanup script: remove_my-dev-cluster.sh
Note: Cluster creation takes approximately 15-20 minutes.
Delete a Cluster¶
Run the generated removal script:
The script will: - Delete the EKS cluster and all associated resources - Self-delete after successful completion
Important: Always delete your cluster before end of business to avoid unnecessary costs.
List Active Clusters¶
Check what clusters currently exist:
List Removal Scripts¶
See available cleanup scripts:
What Gets Created¶
The eksctl create cluster command provisions:
- EKS control plane
- Managed node group (default configuration)
- VPC with public/private subnets
- IAM roles for cluster and nodes
- Security groups
Cost Considerations¶
EKS clusters incur costs for: - Control plane ($0.10/hour) - EC2 instances (node group) - NAT gateways - Load balancers (if created)
Always clean up clusters when not in use.
Troubleshooting¶
Cluster already exists¶
Choose a different name or delete the existing cluster first.
eksctl not found¶
Install eksctl:
# macOS
brew install eksctl
# Linux
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
AWS credentials expired¶
Re-authenticate:
See Also¶
- AWS SSO Setup - Configure AWS CLI
- SSO Permissions - Required access levels