- Deploy Kafka
kubectl apply -f deployment/kafka- Deploy Person Microservices
kubectl apply -f deployment/person-service- Deploy Location Microservices
kubectl apply -f deployment/location-service- Deploy Connection Microservices
kubectl apply -f deployment/connection-service- DeploY Api Gateway
to deploy API gateway, we need to deploy first an open-source ingress-controller ingress nginx that will route the traffic to destinated microservices following our ingress rules
- Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/baremetal/deploy.yaml- Patching Ingress Controller Nodeort
kubectl -n ingress-nginx patch svc ingress-nginx-controller --patch '{"spec": {"ports": [{"name": "http","port": 80, "nodePort": 30000}]}}'- Ingress Rules
kubectl apply -f deployment/api-gateway- Deploy frontend
kubectl apply -f deployment/frontend/- Seed databases
Before testing APIs it is mandatory to seed person and location databases in order to create DB tables and some dummy data
- Seed location db
sh scripts/run_db_cmd_location.sh $(kubectl get pod -l service=location-postgres --no-headers -o jsonpath='{.items[0].metadata.name}{"\n"}')- Seed person db
sh scripts/run_db_cmd_person.sh $(kubectl get pod -l service=person-postgres --no-headers -o jsonpath='{.items[0].metadata.name}{"\n"}')
Once the project is up and running, you should be able to see 11 deployment of the system and 11 services exposing them as well as an ingress object with behind the scene ingress-controller as API-gateway
kubectl get pods and kubectl get services and kubectl describe ingress udaconnect-ingress
These pages should also load on your web browser:
http://localhost:30000/api/- Base path for APIhttp://localhost:30050/- Frontend ReactJS Application