mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-23 22:26:29 +00:00
Istio use Hey to generate load
This commit is contained in:
@@ -80,18 +80,14 @@ kubectl -n test apply -f ./deploy/istio-v1alpha3/istio-virtual-service.yaml
|
||||
kubectl -n test apply -f ./deploy/istio-v1alpha3/istio-gateway.yaml
|
||||
```
|
||||
|
||||
Create a `curl` pod for testing:
|
||||
Create a `loadtest` pod for testing:
|
||||
|
||||
```bash
|
||||
kubectl -n test run -i --rm --tty curl --image=radial/busyboxplus:curl --restart=Never -- sh
|
||||
kubectl -n test run -i --rm --tty loadtest --image=stefanprodan/loadtest --restart=Never -- sh
|
||||
```
|
||||
|
||||
Run inside the `curl` pod:
|
||||
Start the load test:
|
||||
|
||||
```bash
|
||||
curl -v -H "Host: podinfo.test" http://podinfo.test:9898/version
|
||||
version: 0.2.1
|
||||
|
||||
curl -v -H "x-user: insider" -H "Host: podinfo.test" http://podinfo.test:9898/version
|
||||
version: 0.2.2
|
||||
hey -n 100000 -c 2 -q 5 http://podinfo.test:9898/version
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ metadata:
|
||||
app: podinfo
|
||||
release: canary
|
||||
spec:
|
||||
replicas: 2
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: podinfo
|
||||
|
||||
@@ -8,7 +8,7 @@ metadata:
|
||||
app: podinfo
|
||||
release: ga
|
||||
spec:
|
||||
replicas: 2
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: podinfo
|
||||
|
||||
@@ -11,26 +11,30 @@ spec:
|
||||
gateways:
|
||||
- mesh
|
||||
- podinfo-gateway
|
||||
# http:
|
||||
# - route:
|
||||
# - destination:
|
||||
# name: podinfo
|
||||
# subset: canary
|
||||
# weight: 50
|
||||
# - destination:
|
||||
# name: podinfo
|
||||
# subset: ga
|
||||
# weight: 50
|
||||
http:
|
||||
- match:
|
||||
- headers:
|
||||
x-user:
|
||||
regex: ".*insider.*"
|
||||
route:
|
||||
- destination:
|
||||
name: podinfo.test
|
||||
subset: canary
|
||||
- route:
|
||||
- destination:
|
||||
name: podinfo.test
|
||||
subset: canary
|
||||
weight: 20
|
||||
- destination:
|
||||
name: podinfo.test
|
||||
subset: ga
|
||||
weight: 80
|
||||
# http:
|
||||
# - match:
|
||||
# - headers:
|
||||
# x-user:
|
||||
# exact: insider
|
||||
# source_labels:
|
||||
# release: ga
|
||||
# route:
|
||||
# - destination:
|
||||
# name: podinfo.test
|
||||
# subset: canary
|
||||
# weight: 100
|
||||
# - route:
|
||||
# - destination:
|
||||
# name: podinfo.test
|
||||
# subset: ga
|
||||
# weight: 100
|
||||
|
||||
Reference in New Issue
Block a user