Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niveshsunny/terraform-eks
I created my own EKS cluster within a VPC using Terraform, avoiding modules to gain more control over the infrastructure.
https://github.com/niveshsunny/terraform-eks
eks iaac terraform vpc
Last synced: 24 days ago
JSON representation
I created my own EKS cluster within a VPC using Terraform, avoiding modules to gain more control over the infrastructure.
- Host: GitHub
- URL: https://github.com/niveshsunny/terraform-eks
- Owner: niveshsunny
- Created: 2024-09-07T18:01:21.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-24T16:46:19.000Z (3 months ago)
- Last Synced: 2024-10-22T05:16:53.233Z (2 months ago)
- Topics: eks, iaac, terraform, vpc
- Language: HCL
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Terraform EKS Cluster in Private VPC
This project demonstrates the creation of an EKS cluster in a private VPC using Terraform. All resources, including VPC, subnets, route tables, NAT gateways, and the EKS cluster, were built from scratch without using pre-built Terraform modules.
## Features
- **EKS Cluster**: Provisioned using AWS EKS.
- **Private VPC**: Custom-built VPC with private subnets for enhanced security.
- **Subnets and Route Tables**: Handled manually to control traffic flow.
- **NAT Gateways**: Ensuring private access for instances in the private subnets.
- **IAM Roles and Policies**: Configured for EKS workers and control plane.## Prerequisites
- AWS Account
- Terraform 1.x.x
- AWS CLI
- kubectl## Usage
1. Clone the repository:
```bash
git clone https://github.com/niveshsunny/terraform-eks.git
cd terraform-eks
```2. Initialize the project:
```bash
terraform init
```3. Apply the configuration:
```bash
terraform apply
```4. Update your kubeconfig to interact with the cluster:
```bash
aws eks --region update-kubeconfig --name
```5. Verify your cluster:
```bash
kubectl get nodes
```## Resources
- **VPC**: Custom-built VPC with private subnets.
- **EKS Cluster**: Created from scratch.
- **NAT Gateways**: Provisioned for internet access in the private subnets.
- **IAM Roles and Policies**: Configured for the EKS cluster.## Architecture Diagram
![Alt text]( https://res.cloudinary.com/practicaldev/image/fetch/s--n_cbMy3c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cp8bxvvknzy6k7js7bi4.png)
## Notes
- This project does not use pre-built Terraform modules to maintain full control and customization.
- Ensure your AWS credentials are properly configured before applying the Terraform plan.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.