Skip to content

Commit bd308be

Browse files
committed
update instructions
1 parent 3613e67 commit bd308be

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

kubernetes/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
* `kubectl rollout restart deployment metrics-server -n kube-system`
1212

1313
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:
1920
* In a separate terminal, run command to carry conduct load testing
2021
```
2122
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,10 +28,10 @@
2728
4. Collaboration Service: `http://collaboration-service.default.svc.cluster.local:3004/api/collab/test`
2829
* `Ctrl + C` to stop sending requests
2930
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:
3132
* user-service
3233
* question-service
3334
* matching-service
3435
* collaboration-service
3536
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

Comments
 (0)