问题描述
k8s 使用locust进行压力测试并同步数据到grafana,提供yaml和镜像,开箱即用。
解决方案:
locust master 用于任务下发 locust-master.yaml
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: locust-master-controller
namespace: boomer
labels:
k8s-app: locust-master
spec:
selector:
matchLabels:
k8s-app: locust-master
replicas: 1
template:
metadata:
labels:
k8s-app: locust-master
name: locust-master
spec:
containers:
- name: locust-master
image: registry.cn-shenzhen.aliyuncs.com/yeyuguang/locust-master:v1.0
ports:
- name: loc-master-web
containerPort: 8089
protocol: TCP
- name: loc-master-p1
containerPort: