{"id":19168840,"url":"https://github.com/nikoshet/amazon-eks-deployment-with-terraform","last_synced_at":"2025-02-22T23:41:10.505Z","repository":{"id":198450548,"uuid":"493748993","full_name":"nikoshet/amazon-eks-deployment-with-terraform","owner":"nikoshet","description":"Deployment on Amazon EKS with Terraform","archived":false,"fork":false,"pushed_at":"2022-06-01T13:53:14.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-03T23:22:44.905Z","etag":null,"topics":["amazon","aws","aws-eks","cloud","docker","eks","kubectl","kubernetes","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikoshet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-18T16:50:37.000Z","updated_at":"2022-05-18T18:22:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"77672a70-f07a-45b5-8e5b-4b718a663440","html_url":"https://github.com/nikoshet/amazon-eks-deployment-with-terraform","commit_stats":null,"previous_names":["nikoshet/amazon-eks-deployment-with-terraform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoshet%2Famazon-eks-deployment-with-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoshet%2Famazon-eks-deployment-with-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoshet%2Famazon-eks-deployment-with-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikoshet%2Famazon-eks-deployment-with-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikoshet","download_url":"https://codeload.github.com/nikoshet/amazon-eks-deployment-with-terraform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240250350,"owners_count":19771775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon","aws","aws-eks","cloud","docker","eks","kubectl","kubernetes","terraform"],"created_at":"2024-11-09T09:43:58.104Z","updated_at":"2025-02-22T23:41:10.485Z","avatar_url":"https://github.com/nikoshet.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deployment on Amazon EKS with Terraform\n\n## About \nThis project creates an Elastic Kubernetes (EKS) cluster on AWS and deploys a demo Web Server with its Load Balancer using Terraform.\n\n## Used\n\n| Name | Version\n| :---: | :---: \n| [terraform](https://www.terraform.io/cli) | \u003e= 0.14.0 \n| [kubectl](https://kubernetes.io/docs/tasks/tools/)  | v1.19.0\n| [aws provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) | \u003e= 4.14.0 \n| [kubernetes provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs) | ~\u003e 2.10\n| [kubernetes cluster_version](https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest#input_cluster_version) | 1.21\n| [eks version](https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/18.21.0) |  ~\u003e 18.21.0\n\n## Steps To Follow\n* Create a Free Tier Account in AWS \n* Setup an IAM User and its credentials, as well as set permissions and tags (relative link [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console))\n* Store User, Access Key ID, Secret Access Key, ID locally\n* Do updates and install [Terraform](https://www.terraform.io/cli), [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n```\n# install Terraform\nsudo apt-get update -y \u0026\u0026 sudo apt-get install -y gnupg software-properties-common curl\ncurl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -\nsudo apt-add-repository \"deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main\"\nsudo apt-get update -y \u0026\u0026 sudo apt-get install terraform\n# install awscli\nsudo apt-get install -y awscli\n```\n* Set AWS credentials as variables or configure them in ~/.aws/credentials file to login to AWS\n```\naws configure\n//export AWS_SECRET_ACCESS_KEY=\"YOUR_ACCESS_KEY\"\n//export AWS_ACCESS_KEY_ID=\"YOUR_KEY_ID \" \n```\n* Download Terraform libraries and initialize the Terraform state for the main application, verify the execution plan and apply infra\n```\nterraform init\n\nterraform plan\nterraform apply\n```\n\n\n## To interact with the cluster\n* Download and install [kubectl](https://kubernetes.io/docs/tasks/tools/) \n```\ncurl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl\nchmod +x ./kubectl\nmv ./kubectl /usr/local/bin/kubectl\n```\n* Get the EKS configuration file\n```\n#rm -rf ~/.kube/config\nmv ~/.kube/config ~/.kube/config_temp\naws eks update-kubeconfig --name eks-cluster --region eu-central-1\n```\n* Now you can interact with the cluster\n```\nkubectl get nodes\nkubectl get deploy\nkubectl get svc\n```\n\n## To make sure that the Load Balancer and the Web Server are working\n```\nexport lb_url=$(kubectl get svc terraform-example-webserver -o jsonpath='{.status.loadBalancer.ingress[*].hostname}')\n# curl -k -s http://${lb_url}\n```\n(or copy the load_balancer_hostname output and paste it in your browser)\n\n## To clean up\n```\nterraform destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoshet%2Famazon-eks-deployment-with-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikoshet%2Famazon-eks-deployment-with-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikoshet%2Famazon-eks-deployment-with-terraform/lists"}