{"id":28566569,"url":"https://github.com/notharshhaa/ci-cd_eks-github_actions","last_synced_at":"2025-06-10T15:11:20.615Z","repository":{"id":284685027,"uuid":"689391765","full_name":"NotHarshhaa/CI-CD_EKS-GitHub_Actions","owner":"NotHarshhaa","description":"A fully automated CI/CD pipeline that builds, tests, and deploys a Node.js application on Amazon EKS using GitHub Actions, Terraform, and Kubernetes.","archived":false,"fork":false,"pushed_at":"2025-03-27T05:48:25.000Z","size":19,"stargazers_count":74,"open_issues_count":0,"forks_count":56,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T06:28:26.184Z","etag":null,"topics":["aws","aws-eks","cicd","devops","eks","eks-cluster","github-actions","jenkins","nodejs"],"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/NotHarshhaa.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-09-09T16:54:09.000Z","updated_at":"2025-03-27T05:48:29.000Z","dependencies_parsed_at":"2025-03-27T06:38:32.764Z","dependency_job_id":null,"html_url":"https://github.com/NotHarshhaa/CI-CD_EKS-GitHub_Actions","commit_stats":null,"previous_names":["notharshhaa/ci-cd_eks-github_actions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotHarshhaa%2FCI-CD_EKS-GitHub_Actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotHarshhaa%2FCI-CD_EKS-GitHub_Actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotHarshhaa%2FCI-CD_EKS-GitHub_Actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotHarshhaa%2FCI-CD_EKS-GitHub_Actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotHarshhaa","download_url":"https://codeload.github.com/NotHarshhaa/CI-CD_EKS-GitHub_Actions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotHarshhaa%2FCI-CD_EKS-GitHub_Actions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259098639,"owners_count":22804794,"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":["aws","aws-eks","cicd","devops","eks","eks-cluster","github-actions","jenkins","nodejs"],"created_at":"2025-06-10T15:11:18.675Z","updated_at":"2025-06-10T15:11:20.606Z","avatar_url":"https://github.com/NotHarshhaa.png","language":"HCL","readme":"# **🚀 End-to-End CI/CD Pipeline for Node.js App Deployment on EKS using GitHub Actions**  \n\n![eksbanner](https://imgur.com/h87KAuY.png)\n\n---\n\n![CI/CD Pipeline](https://imgur.com/Ctznv2m.png)  \n\n## **📌 Table of Contents**  \n\n- [**🚀 End-to-End CI/CD Pipeline for Node.js App Deployment on EKS using GitHub Actions**](#-end-to-end-cicd-pipeline-for-nodejs-app-deployment-on-eks-using-github-actions)\n  - [**📌 Table of Contents**](#-table-of-contents)\n  - [**📂 Repository Structure**](#-repository-structure)\n  - [**🔧 Prerequisites**](#-prerequisites)\n  - [**⚙️ CI/CD Workflow**](#️-cicd-workflow)\n    - [**🔨 Build Job**](#-build-job)\n    - [**🚀 Deployment Job**](#-deployment-job)\n  - [**🏗️ Infrastructure Details**](#️-infrastructure-details)\n  - [**📦 Application Deployment Strategy**](#-application-deployment-strategy)\n  - [**🔄 GitOps Principles**](#-gitops-principles)\n  - [**🔒 Security Best Practices**](#-security-best-practices)\n  - [**📢 Notifications \\\u0026 Alerts**](#-notifications--alerts)\n  - [**📊 Monitoring \\\u0026 Logging**](#-monitoring--logging)\n  - [**📜 Contributing**](#-contributing)\n  - [**⭐ Support \\\u0026 Author**](#-support--author)\n  - [**⭐ Hit the Star!**](#-hit-the-star)\n  - [🛠️ **Author \\\u0026 Community**](#️-author--community)\n  - [📧 **Let's Connect!**](#-lets-connect)\n  - [📢 **Stay Updated!**](#-stay-updated)\n\n---\n\n## **📂 Repository Structure**  \n\nThe repository is structured for **modularity and maintainability**.:\n\n```tree\n📂 root  \n├── 📂 app                      # Application source code  \n│   ├── app.py                 # Python application logic (if applicable)  \n│   ├── calculator.js          # Business logic for calculations  \n│   ├── calculator.test.js     # Unit tests for calculator functions  \n│   ├── Dockerfile             # Dockerfile for building the Node.js app  \n│   ├── Dockerfile-python      # Dockerfile for a Python-based version (if needed)  \n│   ├── index.js               # Main entry point of the Node.js application  \n│   └── package.json           # Project dependencies and scripts  \n│  \n├── 📂 kustomize               # Kubernetes manifests managed with Kustomize  \n│   ├── 📂 base                # Base configurations common for all environments  \n│   │   ├── deploy.yaml        # Deployment definition for the application  \n│   │   ├── ingress.yaml       # Ingress configuration for routing traffic  \n│   │   ├── kustomization.yaml # Kustomize configuration file  \n│   │   └── svc.yaml           # Kubernetes Service definition  \n│   │  \n│   ├── 📂 overlays            # Environment-specific configurations  \n│   │   ├── 📂 dev             # Dev environment-specific Kustomize configs  \n│   │   │   ├── deploy-dev.yaml        # Dev-specific deployment file  \n│   │   │   ├── ingress-dev.yaml       # Dev-specific ingress settings  \n│   │   │   ├── kustomization.yaml     # Kustomize configuration for Dev  \n│   │   │   └── svc-dev.yaml           # Dev-specific service settings  \n│   │   │  \n│   │   ├── 📂 prod            # Production environment-specific Kustomize configs  \n│   │   │   ├── deploy-prod.yaml       # Production-specific deployment file  \n│   │   │   ├── ingress-prod.yaml      # Production-specific ingress settings  \n│   │   │   ├── kustomization.yaml     # Kustomize configuration for Prod  \n│   │   │   └── svc-prod.yaml          # Production-specific service settings  \n│   │   │  \n│   │   ├── 📂 staging         # Staging environment-specific Kustomize configs  \n│   │   │   ├── deploy-staging.yaml    # Staging-specific deployment file  \n│   │   │   ├── ingress-staging.yaml   # Staging-specific ingress settings  \n│   │   │   ├── kustomization.yaml     # Kustomize configuration for Staging  \n│   │   │   └── svc-staging.yaml       # Staging-specific service settings  \n│  \n├── README.md                  # Project documentation and setup guide  \n│  \n├── 📂 terraform               # Terraform configuration for infrastructure provisioning  \n│   ├── ingress-nginx.tf       # Terraform script for setting up NGINX Ingress  \n│   ├── main.tf                # Main Terraform file defining AWS infrastructure  \n│   ├── outputs.tf             # Defines Terraform outputs (e.g., cluster endpoints)  \n│   ├── terraform.tf           # Backend configuration for Terraform state management  \n│   └── variables.tf           # Input variables for Terraform modules  \n│  \n└── VERSION                    # Tracks application versioning (Semantic Versioning)  \n```\n\n---\n\n## **🔧 Prerequisites**  \n\nBefore you proceed, ensure you have the following installed:  \n\n- 🛠 **Node.js (\u003e=14.x)**  \n- 🐳 **Docker (latest version)**  \n- 🏗️ **Terraform (\u003e=1.0)**  \n- ☸ **kubectl (latest version)**  \n- 🎭 **Kustomize**  \n- ☁ **AWS CLI \u0026 eksctl**  \n- ⚙️ **GitHub Actions configured**  \n- 🔑 **AWS IAM permissions to manage EKS**  \n\n---\n\n## **⚙️ CI/CD Workflow**  \n\nThe **CI/CD pipeline** automates the entire deployment process using **GitHub Actions**.  \n\n### **🔨 Build Job**  \n\n1️⃣ **Set Up the Environment**  \n\n- Install **Node.js dependencies** using `npm install`.  \n- Lint the code to ensure quality standards.  \n\n2️⃣ **Run Tests**  \n\n- Execute **unit tests** with `npm test`.  \n- Generate test reports for visibility.  \n\n3️⃣ **Version Management**  \n\n- Uses **Semantic Versioning** (`major.minor.patch`).  \n- Auto-increments the version based on commit messages.  \n\n4️⃣ **Build \u0026 Push Docker Image**  \n\n- **Builds a Docker image** of the application.  \n- Pushes it to **Amazon Elastic Container Registry (ECR)**.  \n\n---\n\n### **🚀 Deployment Job**  \n\n1️⃣ **Terraform Setup**  \n\n- Initializes Terraform with `terraform init`.  \n- Ensures correct **state management**.  \n\n2️⃣ **Infrastructure Provisioning**  \n\n- Executes `terraform plan` and `terraform apply`.  \n- Deploys EKS clusters, networking, and storage.  \n\n3️⃣ **Kubernetes Configuration**  \n\n- Configures `kubectl` to interact with the cluster.  \n- Applies `Kustomize` overlays for environment-specific settings.  \n\n4️⃣ **Ingress Controller Setup**  \n\n- Uses **Helm** to install **NGINX Ingress**.  \n\n5️⃣ **Application Deployment**  \n\n- Deploys the latest **Docker image** to Kubernetes.  \n- Exposes the service via **Ingress and Load Balancer**.  \n\n---\n\n## **🏗️ Infrastructure Details**  \n\n| Environment | Instance Type | Replica Count |\n|-------------|--------------|---------------|\n| **Dev**     | `t3.small`    | 1             |\n| **Staging** | `t3.medium`   | 3             |\n| **Prod**    | `t3.large`    | 3             |\n\n✅ **DNS Automation via Cloudflare**  \n\n- Environment-specific subdomains:  \n  - `dev.example.com`  \n  - `staging.example.com`  \n  - `prod.example.com`  \n\n---\n\n## **📦 Application Deployment Strategy**  \n\nThis project supports **multiple deployment strategies**:  \n\n✅ **Rolling Updates** – Default strategy, ensuring zero downtime.  \n✅ **Blue-Green Deployment** – Used in production environments.  \n✅ **Canary Deployments** – Gradual rollout for safe updates.  \n\n---\n\n## **🔄 GitOps Principles**  \n\n✔ **Git as the Source of Truth**  \n✔ **Declarative Infrastructure** (Terraform \u0026 Kubernetes)  \n✔ **Automated Deployments via GitHub Actions**  \n\nEvery infrastructure change must be made via a **Git commit**.  \n\n---\n\n## **🔒 Security Best Practices**  \n\n🔐 **Secrets Management**  \n\n- Uses **AWS Secrets Manager** \u0026 GitHub Actions **encrypted secrets**.  \n\n🛡 **Container Security**  \n\n- Uses **Trivy** and **Docker Bench Security** for vulnerability scanning.  \n\n🚧 **IAM \u0026 Least Privilege**  \n\n- Uses **AWS IAM roles** with restricted access.  \n\n---\n\n## **📢 Notifications \u0026 Alerts**  \n\n🔔 **Slack \u0026 Email Notifications**  \n\n- **CI/CD Job Updates** – Pipeline status alerts.  \n- **DNS Updates** – Cloudflare integration for alerts.  \n\n📡 **Monitoring \u0026 Logging**  \n\n- **AWS CloudWatch** for logs \u0026 metrics.  \n- **Prometheus \u0026 Grafana** for observability.  \n\n---\n\n## **📊 Monitoring \u0026 Logging**  \n\n✅ **Application Logs** – Aggregated using **Fluent Bit**.  \n✅ **Infrastructure Logs** – Stored in **AWS CloudWatch Logs**.  \n✅ **Metrics Monitoring** – Tracked using **Prometheus \u0026 Grafana**.  \n\n---\n\n## **📜 Contributing**  \n\nWant to contribute? Here’s how:  \n\n1. **Fork the repository** \u0026 create a new branch.  \n2. Make your changes and **commit with a descriptive message**.  \n3. Open a **Pull Request (PR)** for review.  \n\n---\n\n## **⭐ Support \u0026 Author**  \n\n## **⭐ Hit the Star!**  \n\nIf you find this repository helpful and plan to use it for learning, please consider giving it a star ⭐. Your support motivates me to keep improving and adding more valuable content! 🚀  \n\n---\n\n## 🛠️ **Author \u0026 Community**  \n\nThis project is crafted with passion by **[Harshhaa](https://github.com/NotHarshhaa)** 💡.  \n\nI’d love to hear your feedback! Feel free to open an issue, suggest improvements, or just drop by for a discussion. Let’s build a strong DevOps community together!  \n\n---\n\n## 📧 **Let's Connect!**  \n\nStay connected and explore more DevOps content with me:  \n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://linkedin.com/in/harshhaa-vardhan-reddy)  [![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/NotHarshhaa)  [![Telegram](https://img.shields.io/badge/Telegram-26A5E4?style=for-the-badge\u0026logo=telegram\u0026logoColor=white)](https://t.me/prodevopsguy)  [![Dev.to](https://img.shields.io/badge/Dev.to-0A0A0A?style=for-the-badge\u0026logo=dev.to\u0026logoColor=white)](https://dev.to/notharshhaa)  [![Hashnode](https://img.shields.io/badge/Hashnode-2962FF?style=for-the-badge\u0026logo=hashnode\u0026logoColor=white)](https://hashnode.com/@prodevopsguy)  \n\n---\n\n## 📢 **Stay Updated!**  \n\nWant to stay up to date with the latest DevOps trends, best practices, and project updates? Follow me on my blogs and social channels!  \n\n![Follow Me](https://imgur.com/2j7GSPs.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotharshhaa%2Fci-cd_eks-github_actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotharshhaa%2Fci-cd_eks-github_actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotharshhaa%2Fci-cd_eks-github_actions/lists"}