This repository contains Terraform code to create an Amazon Elastic Kubernetes Service (EKS) cluster. The code automates the deployment and management of Kubernetes applications on the AWS cloud using Terraform.
Setup credentials as environment variables
$ export AWS_ACCESS_KEY_ID="aws-access-key"
$ export AWS_SECRET_ACCESS_KEY="aws-secret-key"
$ brew tap hashicorp/tap
$ brew install hashicorp/tap/terraform
Installation guide
Download the TF configuration files
$ git clone https://github.com/vravind1/terraform-eks.git
Initialize Terraform to get necessary providers and modules.
mkdir terraform-eks
$ terraform init
Create execution plan.
$ terraform plan
Execute the actions proposed in a Terraform plan.
$ terraform apply
Installation guide
$ brew install kubectl
Installation guide
Run this command to update the kube config with your cluster details
$ aws eks --region us-east-2 update-kubeconfig --name <eks-cluser-name>
Run this command to get the current status of all nodes in the cluster
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
ip-10-0-1-182.us-east-2.compute.internal Ready <none> 3h25m v1.24.15-eks-a5565ad
ip-10-0-1-99.us-east-2.compute.internal Ready <none> 3h25m v1.24.15-eks-a5565ad
ip-10-0-2-49.us-east-2.compute.internal Ready <none> 3h25m v1.24.15-eks-a5565ad