This project demonstrates deploying a simple Node.js employee directory application using Docker and Kubernetes. The app is deployed in a local Kind (Kubernetes in Docker) cluster and managed through a CI/CD pipeline for automated builds, deployments, and updates.
-
Dockerized App: Packaged Node.js app for easy deployment.
-
Kind Cluster: Lightweight Kubernetes cluster for local testing.
-
Scalability: Supports multiple replicas for load balancing.
-
Automated CI/CD: Builds and deploys via Jenkins.
-
Local Access: Access app locally through port 5000.
-
Docker
-
Kind
-
Kubernetes CLI (kubectl)
-
Jenkins with Docker and Kubernetes plugins
-
Docker Hub account
git clone https://github.com/AbdullahTarar/dockerized-node-app.git
cd dockerized-node-app` docker build -t <name of the container>:latest .
docker run -p 5000:5000 <name of the container>:latest` curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind sudo mv ./kind /usr/local/bin/kind
kind create cluster --name node-app-cluster
kubectl cluster-info --context kind-node-app-cluster
docker ps -akubectl apply -f <deployment.yaml>
kubectl apply -f <service.yaml>
kubectl port-forward svc/node-app 5000:5000Open the app at http://localhost:5000.
-
Install Jenkins and plugins (Docker, GitHub, Kubernetes CLI).
-
Add Docker Hub credentials in Jenkins.
-
Create a new pipeline using the Jenkinsfile in the repository.
-
Push changes to trigger the pipeline for build and deployment.
kubectl get pods
kubectl rollout status deployment/node-app- Abdullah Tarar
This project is licensed under the MIT License. Let me know if you’d like to simplify this further!
