Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rhoribe/aws-eks

This project deploys an Amazon EKS (Elastic Kubernetes Service) cluster using Terraform. It sets up a managed Kubernetes cluster on AWS, enabling you to run containerized applications on a scalable infrastructure.
https://github.com/rhoribe/aws-eks

aws eks

Last synced: about 1 month ago
JSON representation

This project deploys an Amazon EKS (Elastic Kubernetes Service) cluster using Terraform. It sets up a managed Kubernetes cluster on AWS, enabling you to run containerized applications on a scalable infrastructure.

Awesome Lists containing this project

README

        

# Deploy an EKS Cluster with Terraform

This project deploys an Amazon EKS (Elastic Kubernetes Service) cluster using Terraform. It sets up a managed Kubernetes cluster on AWS, enabling you to run containerized applications on a scalable infrastructure.

## Prerequisites

1. **Terraform**: Make sure Terraform is installed (~> 1.9.0).
2. **AWS CLI**: Configure the AWS CLI with your credentials.
3. **IAM Permissions**: Ensure that the user has permissions to create EKS and IAM resources on AWS.
4. **kubectl**: To manage the Kubernetes cluster, install kubectl.

## Getting Started

Follow these steps to set up the EKS cluster.

### Clone the Repository

Clone this repository to your local machine.

```bash
git clone https://github.com/rhoribe/aws-eks.git
cd aws-eks
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | ~> 1.9.0 |
| [aws](#requirement\_aws) | ~> 5.0 |
| [kubectl](#requirement\_kubectl) | ~> 1.14.0 |
| [kubernetes](#requirement\_kubernetes) | ~> 2.14.0 |
| [tls](#requirement\_tls) | ~> 4.0.4 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | ~> 5.0 |
| [kubernetes](#provider\_kubernetes) | ~> 2.14.0 |
| [tls](#provider\_tls) | ~> 4.0.4 |

## Resources

| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_eks_addon.coredns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.kubeproxy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_addon.vpc-cni](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) | resource |
| [aws_eks_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster) | resource |
| [aws_eks_node_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_node_group) | resource |
| [aws_iam_openid_connect_provider.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_openid_connect_provider) | resource |
| [aws_iam_role.eks_cluster_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role.eks_worker_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.ec2_container_registry_read_only_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_cluster_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_cni_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_service_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_iam_role_policy_attachment.eks_worker_node_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_kms_alias.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_alias) | resource |
| [aws_kms_key.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |
| [aws_launch_template.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) | resource |
| [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group_rule.all](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.all_control_plane](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_ingress_https](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_master_1](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_master_2](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_ports_1](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_ports_2](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.cluster_webhooks](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.eks_coredns_tcp](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.eks_coredns_udp](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.nodeport_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.nodeport_cluster_udp](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.nodeport_master](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.nodeport_master_udp](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [kubernetes_config_map_v1_data.aws_auth](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map_v1_data) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_eks_addon_version.coredns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_addon_version) | data source |
| [aws_eks_addon_version.kubeproxy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_addon_version) | data source |
| [aws_eks_addon_version.vpc-cni](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_addon_version) | data source |
| [aws_iam_policy_document.eks_cluster_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.eks_worker_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [tls_certificate.this](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/data-sources/certificate) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [aws\_auth\_template\_file](#input\_aws\_auth\_template\_file) | AWS Auth Template File | `any` | n/a | yes |
| [cidr\_blocks](#input\_cidr\_blocks) | cidrs for the private endpoint, most likely from the subnet (only needed when not using subnets automatic lookup) | `list(string)` | n/a | yes |
| [cluster\_name](#input\_cluster\_name) | Name of EKS | `string` | n/a | yes |
| [control\_plane\_logs\_retention](#input\_control\_plane\_logs\_retention) | Control Plane Logs Retention | `number` | n/a | yes |
| [image\_id](#input\_image\_id) | AMI for EKS | `string` | n/a | yes |
| [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes Version | `string` | n/a | yes |
| [log\_group\_class](#input\_log\_group\_class) | Log Group Class | `string` | n/a | yes |
| [node\_groups](#input\_node\_groups) | config block for node groups | `any` | n/a | yes |
| [public\_cidr\_access](#input\_public\_cidr\_access) | cidrs allowed to access the public endpoint | `list(string)` | `[]` | no |
| [subnets\_ids](#input\_subnets\_ids) | IDs of private subnets in VPC (only needed when not using subnets automatic lookup) | `list(string)` | n/a | yes |
| [tags](#input\_tags) | Tags to apply to all resources | `map(string)` | n/a | yes |
| [vpc\_id](#input\_vpc\_id) | ID of VPC to deploy to (only needed when not using subnets automatic lookup) | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| [cluster\_certificate\_authority\_data](#output\_cluster\_certificate\_authority\_data) | Base64 encoded certificate data required to communicate with the cluster |
| [cluster\_endpoint](#output\_cluster\_endpoint) | Endpoint for the EKS cluster |
| [cluster\_id](#output\_cluster\_id) | ID of the EKS cluster |
| [cluster\_role\_arn](#output\_cluster\_role\_arn) | ARN of the IAM role used by the EKS cluster for managing AWS resources |
| [cluster\_security\_group\_custom\_id](#output\_cluster\_security\_group\_custom\_id) | Security group ID attached to the EKS cluster |
| [cluster\_security\_group\_id](#output\_cluster\_security\_group\_id) | Security group ID attached to the EKS cluster |
| [worker\_role\_arn](#output\_worker\_role\_arn) | ARN of the IAM role assigned to EKS worker nodes, allowing them to interact with AWS resources |README.md