Skip to content

Benchmark and Validate Kubernetes gRPC Services

Benchmark, and validate a gRPC service inside a Kubernetes cluster using the load-test-grpc experiment. The experiment is run inside the cluster. The gRPC service may be externally exposed or local to the cluster.


Before you begin
  1. Try the basic load-test-grpc tutorial.
  2. Try the Kubernetes usage tutorial for the load-test-http experiment.
  3. Ensure that you have a Kubernetes cluster and the kubectl CLI. You may run a local Kubernetes cluster using tools like Kind or Minikube.
  4. Deploy the sample gRPC service in the Kubernetes cluster.
    kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051
    kubectl expose deploy hello --port=50051
    

Launch experiment

Launch a load-test-grpc experiment inside the Kubernetes cluster. Note that the gRPC host in this experiment is hello.default, which refers to a hostname inside the Kubernetes cluster, specifically, the hello service in the default namespace.

iter8 k launch -c load-test-grpc \
--set host="hello.default:50051" \
--set call="helloworld.Greeter.SayHello" \
--set protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set ready.deploy=hello \
--set ready.service=hello \
--set ready.timeout=60s 

Similarities to load-test-http

You can configure this experiment with various parameter values (in particular, you can specify SLOs) as described in the basic load-test-grpc tutorial. You can assert experiment conditions, view experiment reports, view experiment logs, and cleanup the experiment as described in the Kubernetes usage tutorial for load-test-http.

Back to top