SUSE Support

Here When You Need Us

How to conduct performance testing with Clusterloader2

This document (000020179) is provided subject to the disclaimer at the end of this document.

Situation

How to conduct performance testing with Clusterloader2

Clusterloader is an opensource performance testing tool to measure the performance metrics of your Kubernetes cluster.

Pre-requisites

  • Linux or Mac machine that has Golang and kubectl installed
  • SSH key of the Kubernetes master node
  • Kubeconfig file of the target cluster

Steps

  1. Create a folder named k8s.io under ~/go/src/:

    mkdir ~/go/src/k8s.io
  2. Clone the perf-test under k8s.io folder:

    cd ~/go/src/k8s.io && git clone https://github.com/galal-hussein/perf-tests.git
  3. Navigate to the clusterloader2 directory:

    cd ~/go/src/k8s.io/perf-tests/clusterloader2
  4. Edit the testconfig according to the environment:

    vim testing/load/config.yaml
  5. Execute the clusterloader2 with appropriate options:

    KUBE_SSH_USER=<SSH USERNAME> LOCAL_SSH_KEY=<SSH KEY PATH> go run cmd/clusterloader.go --nodes 3 --mastername=<MASTER NODE NAME> --kubeconfig=<KUBECONFIG FILE PATH> --provider=local --masterip=<MASTER NODE IP ADDRESS> --testconfig=testing/<TESTING SUBJECT>/config.yaml --report-dir=/tmp/reports 2>&1 | tee /tmp/tmp.log
  6. The results of the testing will be stored in the /tmp/reports directory.

FAQ

Errors: [config reading error: decoding failed: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number -4611686018427388 into Go struct field Phase.Steps.Phases.ReplicasPerNamespace of type int32]"
  • Change the value of {{$NODES_PER_NAMESPACE := DefaultParam .NODES_PER_NAMESPACE 1}} to match the number of the nodes in the config.yaml file
level=warning msg="Got errors during step execution: [measurement call APIResponsiveness - APIResponsiveness error: unexpected response: \"# HELP aggregator_openapi_v2_regeneration_count [ALPHA] Counter of OpenAPI v2 spec regeneration count broken down by causing APIService name and reason.
  • Comment out the APIResponsiveness section in config.yaml:
measurements:
- Identifier: APIResponsiveness
  Method: APIResponsiveness
  Params:
    action: reset

Further reading

https://github.com/kubernetes/perf-tests

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020179
  • Creation Date: 13-Jul-2021
  • Modified Date:13-Jul-2021
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.