Skip to content

Commit 3bf74fb

Browse files
committed
layout
1 parent b2ccab4 commit 3bf74fb

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

docs/exercises/project/project.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -248,56 +248,56 @@ Os testes de carga são uma parte importante do desenvolvimento de software, poi
248248

249249
!!! example "Example of HPA"
250250

251-
Open three terminal windows, one for each tab below.
251+
Open three terminal windows, one for each tab below.
252252

253253

254-
=== "1. Create the HPA"
254+
=== "1. Create the HPA"
255255

256-
Create the HPA (Horizontal Pod Autoscaler) for the `gateway` deployment. The HPA will automatically scale the number of pods in the deployment based on CPU usage.
256+
Create the HPA (Horizontal Pod Autoscaler) for the `gateway` deployment. The HPA will automatically scale the number of pods in the deployment based on CPU usage.
257257

258-
``` { .bash .copy }
259-
kubectl autoscale deployment gateway --cpu-percent=50 --min=1 --max=10
260-
```
258+
``` { .bash .copy }
259+
kubectl autoscale deployment gateway --cpu-percent=50 --min=1 --max=10
260+
```
261261

262-
Check the status of the HPA:
262+
Check the status of the HPA:
263263

264-
``` { .bash .copy }
265-
kubectl get hpa
266-
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
267-
gateway Deployment/gateway cpu: 1%/50% 1 10 1 66s
268-
```
264+
``` { .bash .copy }
265+
kubectl get hpa
266+
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
267+
gateway Deployment/gateway cpu: 1%/50% 1 10 1 66s
268+
```
269269

270-
Watch the HPA status:
270+
Watch the HPA status:
271271

272-
``` { .bash .copy }
273-
watch -n 1 'kubectl get hpa'
274-
```
272+
``` { .bash .copy }
273+
watch -n 1 'kubectl get hpa'
274+
```
275275

276-
---
276+
---
277277

278-
At the end of the test, delete the HPA:
278+
At the end of the test, delete the HPA:
279279

280-
``` { .bash .copy }
281-
kubectl delete hpa gateway
282-
```
280+
``` { .bash .copy }
281+
kubectl delete hpa gateway
282+
```
283283

284-
=== "2. Monitor the Pods"
284+
=== "2. Monitor the Pods"
285285

286-
Open another terminal window and monitor the pods in the `gateway` deployment:
286+
Open another terminal window and monitor the pods in the `gateway` deployment:
287287

288-
``` { .bash .copy }
289-
watch -n 1 'kubectl get pods -l app=gateway'
290-
```
288+
``` { .bash .copy }
289+
watch -n 1 'kubectl get pods -l app=gateway'
290+
```
291291

292-
=== "3. Run the Load Test"
292+
=== "3. Run the Load Test"
293293

294-
Open another terminal window and run the load test against the `gateway` deployment. This will simulate a high load on the application, causing the HPA to scale the number of pods in the deployment.
294+
Open another terminal window and run the load test against the `gateway` deployment. This will simulate a high load on the application, causing the HPA to scale the number of pods in the deployment.
295295

296-
``` { .bash .copy }
297-
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://gateway/info; done"
298-
```
296+
``` { .bash .copy }
297+
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://gateway/info; done"
298+
```
299299

300-
In the command above, the `wget` command is used to send requests to the `/info` endpoint of the `gateway` deployment. The `while` loop will continue to send requests until you stop it (e.g., by pressing `Ctrl+C`). The interval between requests is set to 0.01 seconds, which simulates a high load on the application. Try to increase and decrease the interval to see how the HPA reacts to different loads.
300+
In the command above, the `wget` command is used to send requests to the `/info` endpoint of the `gateway` deployment. The `while` loop will continue to send requests until you stop it (e.g., by pressing `Ctrl+C`). The interval between requests is set to 0.01 seconds, which simulates a high load on the application. Try to increase and decrease the interval to see how the HPA reacts to different loads.
301301

302302

303303
## CI/CD

mkdocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ nav:
147147
- 4. Jenkins: exercises/exercise4.md
148148
- 5. MiniKube: exercises/exercise5.md
149149
- Bottlenecks: exercises/bottlenecks/bottlenecks.md
150-
- Team:
151-
- Project: exercises/project/project.md
150+
- Project: exercises/project/project.md
152151
- Concepts:
153152
- Microservices: concepts/microservices.md
154153
- Architectures: concepts/architectures.md

0 commit comments

Comments
 (0)