压测 hey
制作 hey 镜像
1. 容器中执行 go get
go get docker run golang go get -v github.com/rakyll/hey2. 将容器打镜像
docker commit $(docker ps -lq) zhaojizhuang66/heyimage3. docker 中使用
docker run zhaojizhuang66/heyimage hey -n 10 -c 2 'https://json-head.now.sh/'4. k8s 中使用
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
labels:
run: hey
name: hey
spec:
containers:
# This could be any image that we can SSH into and has curl. radial/busyboxplus:curl
- image: zhaojizhuang66/heyimage
imagePullPolicy: IfNotPresent
name: hey
resources: {}
stdin: true
tty: true
EOFLast updated