# curl -sL https://github.com/SigNoz/signoz/raw/main/sample-apps/hotrod/hotrod-install.sh| HELM_RELEASE=signoz SIGNOZ_NAMESPACE=signoz bash
namespace/sample-application created
configmap/locust-cm created
configmap/scripts-cm created
deployment.apps/hotrod created
service/hotrod created
deployment.apps/locust-master created
service/locust-master created
deployment.apps/locust-slave created
✅ Successfully deployed HotROD sample application
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
!! HELM_RELEASE和SIGNOZ_NAMESPACE根据自己实际情况修改。
然后看到所有服务都起来了。
# kubectl get po -n sample-application
NAME READY STATUS RESTARTS AGE
hotrod-794648c678-l226b 1/1 Running 054s
locust-master-b65744bbf-7hxhc 1/1 Running 054s
locust-slave-688c86bcb7-86snl 1/1 Running 054s
1.
2.
3.
4.
5.
然后使用下面的命令来模拟负载。
kubectl --namespace sample-application run strzal --image=djbingham/curl \--restart='OnFailure' -i --tty --rm --command -- curl -X POST -F \'locust_count=6'-F 'hatch_rate=2' http://locust-master:8089/swarm