← Back to Home
Kubernetes, MongoDB & Mongo-Express Deployment

Tech Stack
Kubernetes (Minikube), Docker, ConfigMaps, Secrets, Services (ClusterIP, NodePort), Ingress, YAML Manifests, MongoDB, Mongo-Express, GitHub
Project Goal
Deploy a MongoDB database along with a Mongo-Express web client in a Kubernetes cluster using Minikube, implementing best practices such as environment configuration through ConfigMaps and Secrets, and exposing services internally and externally using Ingress resources. The objective was to practice multi-service orchestration, configuration management, and external access through Kubernetes networking components.
Project Description
This project involved setting up a Kubernetes-based lab environment using Minikube (Docker driver) to deploy a small multi-component application stack (MongoDB + Mongo-Express).
Core Components Deployment
- Created Secrets to securely store sensitive MongoDB credentials.
- Defined ConfigMaps for MongoDB configuration parameters.
- Deployed MongoDB using a Deployment and exposed it via a ClusterIP Service.
- Deployed Mongo-Express as a frontend web client for managing MongoDB.
- Exposed Mongo-Express through NodePort Service to allow access from outside the cluster during development phase.
Networking & Ingress Configuration
- Implemented an Ingress Controller to expose Mongo-Express externally with a custom domain.
- Created an Ingress Resource to route traffic from mongo.local to the Mongo-Express service.
- Edited local /etc/hosts to map the domain to Minikube’s IP, enabling browser access.
Automation & Validation
- Designed a step-by-step execution workflow using kubectl commands for applying resources in order:
- Secrets → Deployments → ConfigMaps → Services → Ingress.
- Verified pod and service status with kubectl get and describe commands.
- Debugged deployment issues using kubectl logs and Minikube service tunneling.
Troubleshooting & Iterations
- Solved issues with pod initialization by ensuring the correct usage of Secrets and ConfigMaps.
- Adjusted Minikube configuration using the Docker driver to avoid networking conflicts.
- Practiced external exposure strategies using both NodePort and Ingress to simulate real-world scenarios.
Outcomes
- Developed a complete workflow for deploying multi-service applications in Kubernetes.
- Gained practical experience in managing Secrets, ConfigMaps, and service exposure
- Built foundational knowledge in troubleshooting Kubernetes deployments and networking issues.
- Established a reusable template structure for future Kubernetes projects, applying YAML manifests in a systematic way.
- Enhanced understanding of Ingress controllers and how to route external traffic within a Kubernetes cluster in a local environment.