This Terraform project automates the provisioning of a robust and scalable infrastructure on AWS. It sets up an Amazon Elastic Kubernetes Service (EKS) cluster and deploys a MongoDB database, ensuring a high-performance environment for containerized applications and data management.
This project is designed to simplify the deployment of an EKS cluster and a MongoDB database on AWS. By using Terraform, the entire setup is automated, making it reproducible and manageable through code.
- EKS Cluster Creation: Creates an EKS cluster for running Kubernetes applications.
- Worker Nodes Configuration: Configures worker nodes for the cluster.
- Networking Setup: Sets up networking, including VPC, subnets, and security groups.
- MongoDB Deployment: Deploys a MongoDB instance on AWS.
- Storage and Backups: Configures storage and backups.
- Security Best Practices: Ensures security best practices, including access control and encryption.
- Scalability: Easily scale the Kubernetes cluster and MongoDB instances based on workload requirements.
- High Availability: Leverages AWS services to ensure high availability and fault tolerance.
- Security: Implements security groups, IAM roles, and other security measures to protect the infrastructure.
- Automation: Uses Terraform to automate the entire setup, making it reproducible and manageable through code.
- Terraform: Install Terraform.
- AWS Account: An AWS account with appropriate permissions to create resources.
- AWS CLI: Install and configure AWS CLI with your AWS credentials.
- MongoDB Self Signed Certificates: Create x.509 Certificates: for MongoDB.
-
Clone the repository:
git clone https://github.com/manuelrojas19/aws-infra-k8s-mongo cd aws-infra-k8s-mongo/terrafom
-
Initialize Terraform:
terraform init
-
Review and edit configuration variables in
variables.tf
as needed. -
Apply the Terraform configuration:
terraform apply
- Confirm the apply action by typing
yes
when prompted.
- Confirm the apply action by typing
-
Access your EKS cluster using the AWS CLI or Kubernetes tools like
kubectl
.
The configuration is managed through the variables.tf
file. Key parameters include:
- AWS Region: The AWS region where the resources will be deployed.
- Cluster Name: The name of the EKS cluster.
- Node Instance Type: The instance type for the worker nodes.
- MongoDB Configuration: Parameters for MongoDB deployment, such as instance size and backup settings.
- CI/CD Integration
- EKS Cluster SSL/TLS Configuration
- Kafka Integration
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.