Skip to content

This project containerizes a Node.js web application using Docker and deploys it on Kubernetes for scalable and efficient resource management. It integrates a Jenkins-based CI/CD pipeline to automate build, testing, and deployment, reducing manual efforts and improving deployment efficiency.

License

Notifications You must be signed in to change notification settings

shivam-dhir/Kubernetes-Based-CI-CD-for-Node.js-Web-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes-based CI/CD for Node.js Web App

This project demonstrates a complete Kubernetes-based CI/CD pipeline for a Node.js web application, focused on improving deployment efficiency, scalability, and reducing manual efforts. The setup includes containerization with Docker, deployment management through Kubernetes, and an automated CI/CD pipeline using Jenkins.

Table of Contents

Overview

This project containerizes a Node.js web application with Docker, enabling efficient, consistent deployments. It utilizes Kubernetes for managing deployment and scaling, enhancing resource utilization. An integrated Jenkins-based CI/CD pipeline automates the build, testing, and deployment process, reducing manual deployment efforts.

Key Features

  • Containerization with Docker: Achieved a 20% improvement in deployment efficiency.
  • Scalable Deployment with Kubernetes: Increased resource utilization by 30% with Kubernetes deployment and service management.
  • Automated CI/CD with Jenkins: Streamlined deployment process, reducing manual deployment efforts by 25%.

Tech Stack

  • Node.js: Application development
  • Docker: Containerization
  • Kubernetes: Deployment and scaling
  • Jenkins: CI/CD pipeline automation
  • Helm: (Optional) Kubernetes templating and configuration

Architecture

  1. Dockerization: The Node.js app is containerized using Docker, ensuring consistent deployments.
  2. Kubernetes: Uses Kubernetes for deployment, resource management, and service orchestration, enabling dynamic scaling.
  3. Jenkins CI/CD: Automated pipeline for continuous integration and deployment, enhancing efficiency.

Getting Started

Prerequisites

  • Docker installed
  • Kubernetes cluster
  • Jenkins set up for CI/CD
  • kubectl configured

Installation

  1. Clone the Repository:

    git clone https://github.com/shivam130502/Kubernetes-Based-CI-CD-for-Node.js-Web-App.git
    cd Kubernetes-Based-CI-CD-for-Node.js-Web-App
  2. Build Docker Image:

    docker build -t Kubernetes-Based-CI-CD-for-Node.js-Web-App.
  3. Push Image to Docker Registry:

    docker tag your-app-name your-dockerhub-username/your-app-name
    docker push your-dockerhub-username/your-app-name
  4. Deploy to Kubernetes: Apply Kubernetes deployment and service files to deploy the app.

    kubectl apply -f Kubernetes-Based-CI-CD-for-Node.js-Web-App-deployment.yml
    kubectl apply -f Kubernetes-Based-CI-CD-for-Node.js-Web-App-service.yml

Running the Application

Access the application through the service endpoint provided by Kubernetes. Run the following to check your service:

kubectl get svc your-service-name

CI/CD Pipeline

  1. Jenkins Setup:
    • Configure a Jenkins pipeline to automate the build, test, and deployment stages.
  2. Pipeline Configuration:
    • Include steps for building the Docker image, pushing it to the registry, and deploying to Kubernetes.

Usage

This repository can serve as a reference architecture for building scalable, containerized applications with an automated CI/CD pipeline.

Results

  • 20% improvement in deployment efficiency due to containerization.
  • 30% better resource utilization through Kubernetes deployment and service management.
  • 25% reduction in manual deployment efforts through the Jenkins CI/CD pipeline.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any suggestions.

License

This project is licensed under the MIT License.

About

This project containerizes a Node.js web application using Docker and deploys it on Kubernetes for scalable and efficient resource management. It integrates a Jenkins-based CI/CD pipeline to automate build, testing, and deployment, reducing manual efforts and improving deployment efficiency.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages