{"id":16143211,"url":"https://github.com/johnbedeir/deploy-goapp-eks","last_synced_at":"2026-01-28T13:04:10.187Z","repository":{"id":179745350,"uuid":"664019862","full_name":"johnbedeir/Deploy-GoApp-EKS","owner":"johnbedeir","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-09T12:10:57.000Z","size":7223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T09:41:58.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/johnbedeir.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":"2023-07-08T17:43:30.000Z","updated_at":"2023-07-09T12:11:03.000Z","dependencies_parsed_at":"2024-05-04T23:35:53.302Z","dependency_job_id":null,"html_url":"https://github.com/johnbedeir/Deploy-GoApp-EKS","commit_stats":null,"previous_names":["johnbedeir/deploy-goapp-eks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnbedeir/Deploy-GoApp-EKS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2FDeploy-GoApp-EKS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2FDeploy-GoApp-EKS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2FDeploy-GoApp-EKS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2FDeploy-GoApp-EKS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnbedeir","download_url":"https://codeload.github.com/johnbedeir/Deploy-GoApp-EKS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnbedeir%2FDeploy-GoApp-EKS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T13:02:32.985Z","status":"ssl_error","status_checked_at":"2026-01-28T13:02:04.945Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-10T00:08:52.795Z","updated_at":"2026-01-28T13:04:10.165Z","avatar_url":"https://github.com/johnbedeir.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CI/CD to deploy Go application on EKS\n\nThis project uses Terraform, Kubernetes, and Github Actions to deploy a Go application on AWS EKS using CI/CD. Here is how you can set it up:\n\n## Prerequisites\n\nBefore you begin, you will need to have the following:\n\n- Docker installed on your machine.\n- Terraform installed on your machine.\n- kubectl installed on your machine.\n- AWS CLI installed and configured on your machine.\n- Base64 tool for encoding files.\n- An AWS account.\n- A GitHub account.\n\n## Directory Structure\n\n- `terraform/`: This directory contains the Terraform configuration files to build EKS and ECR on AWS.\n- `k8s/`: This directory contains Kubernetes manifest files to deploy the Go application along with the database.\n- `Go-app/`: This directory contains the Go application and the Dockerfile.\n- `.github/workflows/`: This directory contains the GitHub Actions CI/CD workflow configurations.\n\n## Setup Steps\n\n### Step 1: AWS Setup\n\nFirstly, make sure you have configured your AWS CLI with the appropriate AWS account credentials.\n\n### Step 2: Terraform Setup\n\nNavigate to the `terraform/` directory and initialize Terraform:\n\n```bash\ncd terraform\nterraform init\n```\n\nPlan the Terraform changes:\n\n```bash\nterraform plan\n```\n\nIf everything looks good, apply the changes:\n\n```bash\nterraform apply\n```\n\n### Step 3: Kubernetes Setup\n\nAfter EKS is set up, you should configure kubectl to interact with the EKS cluster. You can get the kubeconfig file by following the instructions provided by AWS.\n\n```\naws eks update-kubeconfig --name \u003cCLUSTER_NAME\u003e --region \u003cREGION\u003e --kubeconfig \u003cFILE_NAME\u003e\n```\n\nAfter you have your kubeconfig file, encode it in base64:\n\n```bash\nbase64 /path/to/your/kubeconfig \u003e \u003cNEW_FILE_NAME\u003e\n```\n\n### Step 4: GitHub Secrets Setup\n\nNavigate to your GitHub repository and go to \"Settings\" -\u003e \"Secrets and variables\" -\u003e \"Actions \". Here you need to add the following secrets:\n\n- `AWS_ACCESS_KEY_ID`: The AWS access key ID for your account.\n- `AWS_SECRET_ACCESS_KEY`: The AWS secret access key for your account.\n- `KUBECONFIG`: The base64 encoded kubeconfig file from step 3.\n\n### Step 5: CI/CD Setup\n\nGitHub Actions is used for continuous integration and deployment. The workflows are automatically triggered when a push or pull request is made to the main branch. The `ci.yml` workflow builds the Docker image and pushes it to ECR. The `cd.yml` workflow deploys the application to the EKS cluster using the Kubernetes manifests.\n\n`NOTE:` Make sure to update the `Image` from the `k8s/app.yml` file with the `ECR_URI` from your `AWS`\n\n## Running the Application\n\nAfter completing the setup, you can make changes to the Go application in the `Go-app/` directory and push your changes. GitHub Actions will automatically build, push, and deploy your changes.\n\nMake sure to check the \"Actions\" tab in your GitHub repository to see the status of your workflows.\n\n## Cleanup\n\nTo clean up your AWS resources, navigate to the `terraform/` directory and destroy the Terraform resources:\n\n```bash\nterraform destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnbedeir%2Fdeploy-goapp-eks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnbedeir%2Fdeploy-goapp-eks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnbedeir%2Fdeploy-goapp-eks/lists"}