This is a Django, with database PostgreSQL Docker/ Kubernetes cluster
Django application deployed with Kubernetes
First install the dependencies
pip install -r requirements.txt
To start the django app locally
python manage.py runserver
Go to url
Django-app deployment in kubernetes
docker-compose up
The app starts at port number 8020
kubectl apply -f ./kubernetes/secret.yml
kubectl create -f ./kubernetes/config_map.yml
Use Kubernetes to create persistan-volume, persistant-volume-claim deployment and service resources for database
kubectl apply -f ./kubernetes/postgre/component_postgre.yml
kubectl get pod
kubectl get service
kubectl apply -f ./kubernetes/django/component_postgre.yml
minikube get service django-rest-service --url
start the ingress controller
minikube addons enable ingress
minikube get pods -n ingress-nginx
makesure to map the host name to minikube IP in /etc/host file
In this case that shall be
minikube_IP django.postgre.com
kubectl apply -f ./kubernetes/ingress_service.yml