This Terraform project automates the provisioning of an Amazon Elastic Kubernetes Service (EKS) cluster in the specified AWS region. It deploys essential infrastructure components, such as VPC, subnets, security groups, EKS nodes, and Kubernetes configurations like Metrics Server, ALB Ingress Controller, and more.
Before you begin, make sure you have the following prerequisites installed and configured:
The project is organized into several directories, each with its own set of Terraform configurations:
root: Main configuration for the EKS cluster and overall project setup.vpc: Configuration for the Virtual Private Cloud (VPC).eks: Configuration for the EKS cluster itself.nodegroups: Node group configurations for EKS nodes.iam: IAM roles and policies.networking: Networking resources such as security groups and route tables.k8s-config: Kubernetes configurations, including add-ons and controllers.monitoring: Monitoring and logging tool configurations.scripts: Configuration for running scripts on the cluster.
-
Clone this repository:
git clone https://github.com/aman4433/eks-cluster.git
-
Change into the project directory:
cd your-project-directory -
Initialize the project:
terraform init
-
Configure your AWS credentials:
aws configure
-
Deploy the infrastructure:
terraform apply
-
Configure
kubectlto connect to the EKS cluster:aws eks --region <your-region> update-kubeconfig --name <eks-cluster-name>
-
Verify the cluster setup:
kubectl get nodes
You can customize the project by editing the various Terraform configuration files in the respective directories. Refer to the comments and documentation within each configuration file for details on what can be customized.
Regularly check for updates to Terraform, AWS CLI, and Kubernetes tools, and apply any security patches or updates to your infrastructure.
Contributions to this project are welcome. Please follow the guidelines in CONTRIBUTING.md for details on how to contribute.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to AWS for providing the EKS service.
- Thanks to the open-source community for valuable tools and resources.
Make sure to replace `<your/repo>` with the actual repository URL, `<your-project-directory>` with your project's directory, and `<your-region>` and `<eks-cluster-name>` with the appropriate AWS region and EKS cluster name.
This README provides an overview of the project, prerequisites, project structure, usage instructions, customization guidelines, and other important information. You should customize it to provide detailed instructions and explanations specific to your project.