This project sets up a Kubernetes (K8S) cluster to deploy a Python-based to-do web application using Nginx as a reverse proxy.
- Docker
- Minikube
- Kubectl
- Git
git clone https://github.com/Matanmoshes/To-do-web-app-K8S-Cluster.git
cd To-do-web-app-K8S-Cluster
Start Minikube:
minikube start
- Deploy the To-do App
Apply the deployment and service for the to-do app:
kubectl apply -f todo-app-deployment.yaml
kubectl apply -f todo-app-service.yaml
- Deploy Nginx as Reverse Proxy
Apply the deployment, config map, and service for Nginx:
kubectl apply -f nginx-deployment.yaml
kubectl apply -f nginx-configmap.yaml
kubectl apply -f nginx-service.yaml
To access the application, find the Minikube IP and the NodePort assigned to the Nginx service:
- Get the Minikube IP:
minikube ip
- Get the NodePort for the Nginx service:
kubectl get svc nginx-service
Combine the Minikube IP and NodePort to access the application. For example, if the Minikube IP is 192.168.49.2
and the NodePort is 31274
, open:
http://192.168.49.2:31274
If you encounter any issues, check the logs of the pods:
kubectl get pods
kubectl logs <nginx-pod-name>
kubectl logs <todo-app-pod-name>
- Kubernetes
- Minikube
- Docker
- Nginx