This project demonstrates a simple 3-tier application (React Frontend, Node.js API, MySQL Database) capable of running on Docker Compose or Kubernetes (Minikube).
- Docker
- Minikube
- kubectl
-
Start Minikube
minikube start
-
Build Images in Minikube Engine Important: You must build the images inside Minikube's Docker daemon so that the pods can find them (since we use
imagePullPolicy: Never).eval $(minikube docker-env) docker build -t kub-api ./api docker build -t kub-app ./app
(Alternatively, use
minikube image build -t kub-api ./apietc.) -
Apply Kubernetes Manifests
kubectl apply -f k8s/
-
Verify Deployment Check that all pods are running:
kubectl get pods
-
Access the Application To access the Frontend in your browser:
minikube service app-service
To access the API directly (optional):
minikube service api-service
kubectl delete -f k8s/
minikube stop