|
11 | 11 | * `kubectl rollout restart deployment metrics-server -n kube-system`
|
12 | 12 |
|
13 | 13 | 3. Build the PeerPrep Docker containers with `docker compose build`
|
14 |
| -4. Add your docker username in `deploy.sh` at root. |
15 |
| -5. To deploy on Kubernetes, run `./deploy.sh` at root. |
16 |
| -6. View deployments, pods and HPA. Ensure all services are running. `kubectl get all` |
17 |
| -7. Wait for a few minutes for kubernetes to become fully functional. It is ready when running `kubectl get hpa` does not show any `<unknown>` under `TARGETS` |
18 |
| -8. Load testing: |
| 14 | +4. Create the configmap for the nginx api-gateway: run `kubectl create configmap nginx-config --from-file=backend/api-gateway/nginx.conf` at root. |
| 15 | +5. Add your docker username in `deploy.sh` at root. |
| 16 | +6. To deploy on Kubernetes, run `./deploy.sh` at root. |
| 17 | +7. View deployments, pods and HPA. Ensure all services are running. `kubectl get all` |
| 18 | +8. Wait for a few minutes for kubernetes to become fully functional. It is ready when running `kubectl get hpa` does not show any `<unknown>` under `TARGETS` |
| 19 | +9. Load testing: |
19 | 20 | * In a separate terminal, run command to carry conduct load testing
|
20 | 21 | ```
|
21 | 22 | kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://<service>.default.svc.cluster.local:<port>/<route>/test; done"
|
|
27 | 28 | 4. Collaboration Service: `http://collaboration-service.default.svc.cluster.local:3004/api/collab/test`
|
28 | 29 | * `Ctrl + C` to stop sending requests
|
29 | 30 |
|
30 |
| -9. Monitor autoscaling with `kubectl get hpa <service>-hpa --watch`. This command will watch the HPA in real-time, showing changes in replica counts and metrics. It requires a few minutes for the pods to scale up and down. Replace `<service>` appropriately with: |
| 31 | +10. Monitor autoscaling with `kubectl get hpa <service>-hpa --watch`. This command will watch the HPA in real-time, showing changes in replica counts and metrics. It requires a few minutes for the pods to scale up and down. Replace `<service>` appropriately with: |
31 | 32 | * user-service
|
32 | 33 | * question-service
|
33 | 34 | * matching-service
|
34 | 35 | * collaboration-service
|
35 | 36 |
|
36 |
| -10. `Ctrl + C` to exit. To stop and delete to prevent resource wastage: `kubectl delete all --all` |
| 37 | +11. `Ctrl + C` to exit. To stop and delete to prevent resource wastage: `kubectl delete all --all` |
0 commit comments