This project provides a Terraform script for deploying an EKS cluster on AWS as a Platform as a Service (PaaS). It includes modules for VPC, EKS, and Kubernetes addons, and it's designed to be easily configurable and extensible.
Before you begin, make sure you have the following:
- AWS CLI: Installed and configured with the necessary permissions.
- Terraform: Version 0.12 or higher installed.
- AWS Account: Required for deploying resources. Make sure you have access keys.
- ACM Certificate: A valid ACM certificate for your domain is required for secure communication.
Follow these steps to deploy your EKS cluster:
- Clone this repository: Clone the repository to your local machine.
- Navigate: Go to the directory containing
main.tf
. - Initialize Terraform: Run
terraform init
to initialize your Terraform workspace. - Plan Deployment: Run
terraform plan
to see the execution plan. - Apply Deployment: Run
terraform apply
to apply the plan and create resources. - Review: Check the AWS console to review the created resources.
Variables allow you to customize the deployment. You can set these in terraform.tfvars
or as environment variables.
Variable | Description | Default |
---|---|---|
aws_region |
AWS region where resources will be deployed. | us-east-1 |
acm_certificate_arn |
The ARN of the ACM certificate for securing the cluster. | "" |
eks_cluster_domain_name |
The domain name that will be associated with the EKS cluster. | "" |
These are the outputs you will get after a successful deployment.
Output | Description |
---|---|
cluster_name |
The name of the deployed EKS cluster. |
argo_password |
The password for accessing ArgoCD. |
- Purpose: Creates a Virtual Private Cloud (VPC) in AWS.
- Components: Includes subnets, NAT gateways, and route tables.
- Purpose: Sets up an Elastic Kubernetes Service (EKS) cluster.
- Components: Includes node groups and security groups.
- Purpose: Deploys additional Kubernetes services via Helm.
- Components: Includes extensions like Prometheus for monitoring and ArgoCD for continuous deployment.
You can customize the deployment by modifying settings in variables.tf
.
ArgoCD is used for deploying applications on the EKS cluster.
- What it is: A pattern that allows you to manage multiple Kubernetes applications as a single entity.
- How to Use: Modify the
argocd_applications
block ineks_blueprints_kubernetes_addons
.
- What it is: A feature that allows you to specify the domain where an application will be deployed.
- How to Use: Annotations in the Helm chart values can be used for this. Refer to the VaultWarden example for more details.
To remove all the resources created by this script, run terraform destroy
.
This script is distributed under the MIT License. See LICENSE.md
for more details.