This project is a helm chart which includes 2 pods:
- The App pod: Python Flask- returns your external and internal IP addresses.
- The Nginx pod: a reverse proxy for the app.
- I created a Python Flask app. The deployment file pulls the app's docker image from Docker hub. (I also left the code public for your review)
- The deployment of Nginx works as a reverse proxy for the app.
- In the config file, I configured Nginx to route traffic to the app's ClusterIP service.
- The NodePort service is then the deployment's gateway and is routing traffic to the Nginx pod.
-
Install minikube (a single node kubernetes tool). It's a great way for you to learn k8s and practice the skills in your home environment. Your'e going to need a docker engine installed as well. OR You can deploy this chart on your cloud kubernetes distribution. (Eks, Ecs etc.)
-
Clone the repository.
-
Start the minikube cluster:
minikube start --driver=docker
- Deploy the helm chart:
helm install ipapp ./ipappChart --values ./ipappChart/values.yaml
- Expose the NodePort service (skip this step if you are running the app on a k8s cloud dist.)
minikube service nginx-service