This project is a microservices-based e-commerce platform designed to showcase the implementation of modern cloud-native technologies such as Docker and Kubernetes. The platform follows a modular architecture where each service (e.g., product listing, order management, and caching) is independently deployed, scaled, and managed.
- Order Management Service: Handles the lifecycle of orders, including placement, tracking, and fulfillment. It relies on Redis for caching and PostgreSQL for order persistence.
- Product Management Service: Manages the product catalog, including listing, searching, and updating products. The service uses PostgreSQL as the primary database and MongoDB to simulate elastic-search for enhanced text-based searching.
The project is containerized using Docker, and Kubernetes is used for orchestration, scaling, and service management. It leverages Kubernetes YAML files for deploying the individual services, managing environment variables, and configuring databases.
For detailed explanations of the overall architecture and live demonstrations, please refer to the video here.
- Minikube: Ensure that Minikube is installed and running on your local machine.
- kubectl: Install
kubectl
, the command-line tool to interact with Kubernetes clusters. - Docker: Ensure that Docker is installed and running on your local machine.
- Clone the repository to your local machine.
-
Start Minikube: Start a Minikube cluster by running the following command:
minikube start --cpus 4 --memory 6000
-
Verify Minikube Setup: Verify that Minikube is running properly by checking the status:
minikube status
-
Deploy Services: The
deploy.sh
script contains the necessarykubectl
commands to deploy all the services using the provided YAML files. To execute the deployment, simply run:./deploy.sh
This will apply the following configurations:
- Redis Cache: Deployed using
order-cache-redis.yml
, which configures Redis to notify for keyspace events. - PostgreSQL for Orders: Configured in
order-db-postgresql.yml
for storing order data. - Order Management: Deployed using
order-management-service.yml
. - Product Catalog: Managed by two databases—PostgreSQL (
product-db-main-postgresql.yml
) and MongoDB (product-db-es-mongodb.yml
). The product listing service is deployed usingproduct-listing-service.yml
.
- Redis Cache: Deployed using
-
Check Deployments: After running the deployment script, verify that all services have been deployed successfully by listing the Kubernetes pods:
kubectl get pods
-
Access the Services: Depending on the configuration, you may need to expose the services externally. You can expose a service using Minikube:
minikube service <service-name>
For example, to access the Order Management service:
minikube service order-management-service
Expose order-management-service and product-listing-service to test them locally.
By following the steps outlined above, you should be able to successfully run the e-commerce platform on your local Minikube Kubernetes cluster.