Skip to content

Bogdanj22/Kubernetes-WebApp-MongoDB-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project contains a simple full-stack application deployed on a local Kubernetes cluster using Minikube. It includes:

  • A Node.js web application(in docker container)

  • A MongoDB database

  • Kubernetes Deployments, Services, and Secrets

  • Connection between webapp and MongoDB using environment variables

This web application is connected to the MongoDB database, so when you open the app URL, you can view and update data dynamically. Any changes made through the UI are saved directly in the database.

Example Image

🚀 How to Run Locally (Minikube)

# Start Minikube:
minikube start

# Apply secrets and config for MongoDB:
kubectl apply -f mongo-secret.yaml
kubectl apply -f mongo-config.yaml

# Deploy MongoDB and WebApp:
kubectl apply -f mongo.yaml
kubectl apply -f webapp.yaml

# To check if everything is up:
kubectl get all 

# Get Minikube IP:
minikube ip
# If using WSL on windows:
minikube service webapp-service

# Access the web application in your browser:
# http://<minikube-ip>:<nodePort> 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published