This repository provides an automated and secure method for deploying an Amazon Elastic Kubernetes Service (EKS) infrastructure. By leveraging Terraform for infrastructure provisioning, Ansible for configuration management, and Vault for secrets management, the project ensures scalability, security, and efficiency.
- Infrastructure as Code (IaC): Utilize Terraform to define and provision EKS clusters and other AWS resources.
- Configuration Management: Use Ansible for configuring nodes, deploying dependencies, and setting up Kubernetes workloads.
- Secure Secrets Management: Leverage Vault to securely manage sensitive data such as credentials and secrets.
- Modular Design: Organize code into reusable modules for flexibility and clarity.
Before you begin, ensure you have the following installed:
- Terraform (>= 1.0.0)
- Ansible (>= 2.9)
- HashiCorp Vault (>= 1.8.0)
- AWS CLI (>= 2.0.0)
- An AWS account with proper IAM permissions
- A workstation with access to the internet and required tools
git clone https://github.com/your-username/eks-infra-setup.git
cd eks-infra-terraform-ansible-vault
- Navigate to the Terraform directory:
cd terraform
- Update the
variables.tf
file with your AWS region, VPC details, and other parameters. - Initialize Terraform:
terraform init
- Apply the configuration:
This will provision the necessary infrastructure, including EKS clusters.
terraform apply
- Start Vault and authenticate:
vault login <your-auth-token>
- Store sensitive information:
vault kv put secret/eks-access kubeconfig=<your-kubeconfig> aws_key=<your-aws-key>
- Navigate to the Ansible directory:
cd ansible
- Update the
inventory
and playbooks to match your environment. - Execute the playbook to configure the infrastructure:
ansible-playbook main.yml
├── terraform/
│ ├── main.tf
│ ├── variables.tf
│ ├── outputs.tf
├── ansible/
│ ├── inventory
│ ├── roles/
│ ├── main.yml
├── vault/
│ ├── policies/
│ ├── secrets/
├── README.md
Contributions are welcome! Please fork the repository and create a pull request with detailed descriptions of your changes.
This project is licensed under the MIT License.