https://github.com/thesurlydev/eks-terraform
https://github.com/thesurlydev/eks-terraform
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thesurlydev/eks-terraform
- Owner: thesurlydev
- Created: 2020-11-22T22:42:59.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-12T02:18:22.000Z (over 5 years ago)
- Last Synced: 2025-08-04T20:19:58.966Z (10 months ago)
- Language: HCL
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eks-terraform
This repository is an example of deploying a Kubernetes cluster on AWS (AWS EKS) using Terraform.
What's included:
* A VPC with public and private subnets
* An EKS Cluster with mixed Fargate and EC2 workgroups
* Includes nginx deploy for infrastructure verification purposes only
## Usage
To establish remote state using S3 and locking via a DynamoDB table (one-time setup), run the following:
```shell
cd remote-state
tf init
tf plan
tf apply -auto-approve
```
To deploy a VPC, EKS Cluster with Fargate profile and ALB Ingress Controller, run the following from the project root:
```shell
tf init
tf plan
tf apply -auto-approve
```
## Installing the Kubernetes Dashbaord
Follow the instructions here: https://docs.aws.amazon.com/eks/latest/userguide/dashboard-tutorial.html
## Deploy a Test App (nginx)
```shell
kubectl apply -f nginx.yaml
```
## Destroy
```shell
terraform state rm module.aws-alb-ingress-controller.kubernetes_deployment.alb_ingress
terraform destroy -auto-approve
```
## References
* [Set up the ALB Ingress Controller on an Amazon EKS cluster for Fargate](https://aws.amazon.com/premiumsupport/knowledge-center/eks-alb-ingress-controller-fargate/)