In this project, we will be setting up an EKS cluster using terraform modules. We need to ensure we have certain things in place.
- Install Terraform on the local machine. I used v1.5.O for this project
- Install aws-cli to be able to communicate with AWS. I used aws-cli/2.8.1 version
- Install kubectl v1.26
We need to define AWS terraform provider and the backend where our statefiles will be stored. Please ensure you create the s3 bucket used for the backend before executing the project. It is expected that the s3 bucket already exists.
To set up the cluster we need to ensure we create a VPC from scratch which our EKS cluster will use to deploy our worker nodes. We will be making use of modules to set up VPC and EKS clusters respectively.
The value for our variables are
Run terraform init
to initialize the backend and the modules used for this project
I had to resolve a blocker when I tried running terraform apply
I got an error stating an invalid function argument for node-groups, I had to change the eks version to 18.29.0
to rectify the issue.
To confirm all our resources got provisioned as planned.
Now we should try to communicate with our eks cluster
We have a working cluster, so we can deploy a container to the cluster
Our containers are deployed properly, hence let's see it on our browser
Now, let's use argocd to see the applications we deployed. We need to install argocd
We need to get the password, we will use to login into argocd ui.