Skip to content

alonwillmakeit/Terraform-EKS-Provision

Repository files navigation

Devops-Infra-Final

This repository contains terraform code that provisions AWS EKS cluster with EKS managed node group and access to the internet (public) and a "classic" LB. Can be Optionally built automatically with github actions with a push command to branch "main". in addition, has a terraform destroy ability if a commit is pushed to branch "destroy" a pipeline condition will be triggered and run "terraform destroy"

Prerequisites

  • AWS cli configured
  • Github repositroy access
  • Kubernetes with kubectl installed

Terraform Steps :

  1. Clone main repository
git clone [email protected]:alonwillmakeit/Devops-Infra-Final.git && cd Devops-Infra-Final && echo "Generic commit to trigger CI" > genericfiletorunCI.txt
  1. Run
git add . && git commit -m "commit to trigger CI" && git push

K8S application (Counter-Service.py) deployment steps :

  1. Run
aws eks --region us-east-1 update-kubeconfig --name demo
  1. Apply your manifests into the cluster
kubectl apply -f k8s/deployment.yaml && kubectl apply -f k8s/service.yaml
  1. Might need to wait 1-2 minutes of LB to fully registers and run
kubectl get svc | awk '/counter-service/ {print $4}'

If you still don't still a AWS URL, the LB still didn't finish proccessing, when you do see the URL, u can access it and access our application!

Results :

Now we have created an EKS cluster with our application deployed on , that can be accessed throught the link received in step 3 in K8S application

About

Terraform for provisioning EKS with utilities

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages