This document describes how to start running writing benchmarks with mako on GKE.
- Assume cluster exists with istio lean and serving installed.
- ko is installed
- gcloud is installed
Take dataplane-probe
benchmark for example:
-
Edit mako config to attach your desired tags, see the
_example
stanza for how. Then apply it:kubectl apply -f test/performance/config/config-mako.yaml
-
Create an IAM service account:
gcloud iam service-accounts create mako-upload
-
Add the IAM service account here (A current owner must apply this before things will work and the SA must be allowed) then run:
mako update_benchmark test/performance/benchmarks/dataplane-probe/dev.config
-
Create a JSON key for it.
gcloud iam service-accounts keys create robot.json \ --iam-account=mako-upload@${PROJECT_ID}.iam.gserviceaccount.com
-
Create a secret with it:
kubectl create secret generic mako-secrets --from-file=./robot.json
-
Patch Istio:
# This command will fail if no HPA for istio-ingressgateway exists. # If that is the case, the error can be ignored. kubectl patch hpa -n istio-system istio-ingressgateway \ --patch '{"spec": {"minReplicas": 10, "maxReplicas": 10}}' kubectl patch deploy -n istio-system istio-ingressgateway \ --patch '{"spec": {"replicas": 10}}' # This command will fail if no HPA for cluster-local-gateway exists. # If that is the case, the error can be ignored. kubectl patch hpa -n istio-system cluster-local-gateway \ --patch '{"spec": {"minReplicas": 10, "maxReplicas": 10}}' kubectl patch deploy -n istio-system cluster-local-gateway \ --patch '{"spec": {"replicas": 10}}'
-
Patch Knative:
kubectl patch hpa -n knative-serving activator --patch '{"spec": {"minReplicas": 10}}'
-
Apply
setup
for benchmark if there's any. Takedataplane-probe
benchmark for example:ko apply -f test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe-setup.yaml
-
Wait for above to stabilize
-
Apply the benchmark cron. Take
dataplane-probe
benchmark for example:ko apply -f test/performance/benchmarks/dataplane-probe/continuous/dataplane-probe.yaml