{"id":13538763,"url":"https://github.com/mrahbar/k8s-testsuite","last_synced_at":"2026-01-17T12:35:27.959Z","repository":{"id":38271778,"uuid":"106093123","full_name":"mrahbar/k8s-testsuite","owner":"mrahbar","description":"Test suite for Kubernetes","archived":false,"fork":false,"pushed_at":"2018-11-20T20:45:51.000Z","size":12,"stargazers_count":182,"open_issues_count":0,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-03T03:32:02.507Z","etag":null,"topics":["kubernetes","load-testing","network","testing"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrahbar.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-07T11:38:03.000Z","updated_at":"2024-09-26T17:29:43.000Z","dependencies_parsed_at":"2022-08-18T15:21:40.623Z","dependency_job_id":null,"html_url":"https://github.com/mrahbar/k8s-testsuite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrahbar%2Fk8s-testsuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrahbar%2Fk8s-testsuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrahbar%2Fk8s-testsuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrahbar%2Fk8s-testsuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrahbar","download_url":"https://codeload.github.com/mrahbar/k8s-testsuite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763805,"owners_count":20829795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","load-testing","network","testing"],"created_at":"2024-08-01T09:01:15.690Z","updated_at":"2026-01-17T12:35:27.948Z","avatar_url":"https://github.com/mrahbar.png","language":null,"funding_links":[],"categories":["Testing","🏗相关开源项目"],"sub_categories":["[Jenkins](#jenkins)","测试"],"readme":"## Test suite for Kubernetes\n\nThis test suite consists of two Helm charts for network bandwith testing and load testing a Kuberntes cluster.\nThe structure of the included charts looks a follows:\n````\nk8s-testsuite/\n- load-test/\n|____Chart.yaml\n|____values.yaml\n|____.helmignore\n|____templates/\n- network-test/\n|____Chart.yaml\n|____values.yaml\n|____.helmignore\n|____templates/\n```` \n\nYou can install a test by running:\n```` \n\u003e git clone https://github.com/mrahbar/k8s-testsuite.git\n\u003e cd k8s-testsuite\n\u003e helm install --namespace load-test ./load-test\n\u003e helm install --namespace network-test ./network-test\n```` \n\n\n----------\n\n\n### Load test \n\nThis Helm chart deployes a full load test suite in Kubernetes. It consists of the 3 microservices:\n1. A webserver based on [simple-webserver](https://github.com/mrahbar/simple-webserver)\n2. A loadbot client which is based on [this](https://github.com/kubernetes/contrib/tree/master/scale-demo/vegeta) and [that](https://github.com/tsenart/vegeta)\n3. An [aggregator](https://github.com/mrahbar/kubespector/tree/master/resources/scaletest) which orchestrates the test run\n\n##### Aggregator\n\nSince the webservers and the loadbots work autonomic the task of the aggregator ist to orchestrate the test run. \nIt does this by useing the Kubernetes api via [client-go](https://github.com/kubernetes/client-go) library to talk set up the desires replicas of each unit.\nThe test run consists of the following tests scenarios:\n\n| Szenario | Loadbots | Webserver |\n| ------------- |:-------------:| -----:|\n|Idle|1|1|\n|Under load | 1|10|\n|Equal load| 10|10|\n|Over load|100|10|\n|High load|100|100|\n\nThe maximum count of replicas (default 100) can be set with `--set aggregator.maxReplicas=...`.   \n\n##### Loadbots\nThe loadbots have the task to run a predefined level of queries per second. Vegeta publishes [detailed statistics](https://github.com/tsenart/vegeta#json) which will be fetched and evaluated by the aggregator. This metrics are:\n - Queries-Per-Second (QPS)\n - Success-Rate\n - Mean latency\n - 99th percentile latency\n\n#### Test results\nWhen all tests are finishes the aggregator will print the following summary to its logs:\n\n\u003e GENERATING SUMMARY OUTPUT\n\u003e Summary of load scenarios:\n\u003e 0. Idle      : QPS: 10037    Success: 100.00  % Latency: 949.82µs (mean) 3.004154ms (99th)\n\u003e 1. Under load: QPS: 10014    Success: 100.00  % Latency: 965.549µs (mean) 1.985838ms (99th)\n\u003e 2. Equal load: QPS: 50078    Success: 100.00  % Latency: 982.519µs (mean) 7.213018ms (99th)\n\u003e 3. Over load : QPS: 501302   Success: 100.00  % Latency: 198.21451ms (mean) 859.504601ms (99th)\n\u003e 4. High load : QPS: 502471   Success: 100.00  % Latency: 239.26364ms (mean) 1.018523444s (99th) \n\u003e END SUMMARY DATA\n\n##### Configuration\n\nThe following table lists the configurable parameters of the chart and their default values.\n\nParameter | Description | Default\n--------- | ----------- | -------\n`cpuRequests.webserver` | Memory request of each webserver pod | 100m\n`cpuRequests.loadbot` | Memory request of each loadbots  pod | 100m\n`aggregator.maxReplicas` | Maximum replicas for ReplicationController| 100\n`loadbot.rate` | QPS of each loadbot. [Docs](https://github.com/tsenart/vegeta#-rate) | 1000\n`loadbot.workers` | Initial number of workers used in the attack. [Docs](https://github.com/tsenart/vegeta#-workers) | 10\n`loadbot.duration` | Duration of each attack. [Docs](https://github.com/tsenart/vegeta#-duration) | 1s\n`images.*Version` | Image version for *loadbot*, *webserver* and *aggregator* | 1.0\n`imagePullPolicy` | Whether to Always pull imaged or only IfNotPresent | IfNotPresent\n`rbac.create` | Create rbac rules for aggregator | true\n`rbac.serviceAccountName` | rbac.create should be false to use this serviceAccount | \n\n----------\n\n\n### Network test \n\nThis Helm chart deployes a network test suite in Kubernetes. It consists of the 2 microservices:\n1. An orchestrator\n2. A worker launched three times\n\nBoth services are run from the same image either as `--mode=orchestrator` or `--mode=worker`. The services are bases on [k8s-nptest](https://github.com/mrahbar/k8s-nptest) and use iperf3 and netperf-2.7.0 internally. \n\n##### Orchestrator\nThe orchestrator pod coordinates the worker pods to run tests in serial order for the 4 scenarios described below. Using pod affinity rules Worker Pods 1 and 2 are placed on the same Kubernetes node, and Worker Pod 3 is placed on a different node. The nodes all communicate with the orchestrator pod service using simple golang rpcs and request work  items. **A minimum of two Kubernetes worker nodes are necessary for this test.**\n\n##### Test scenario \nFive major network traffic paths are combination of Pod IP vs Virtual IP and whether the pods are co-located on the same node versus a remotely located pod.\n\n1. Same VM using Pod IP: Same VM Pod to Pod traffic tests from Worker 1 to Worker 2 using its Pod IP.\n\n2. Same VM using Cluster/Virtual IP: Same VM Pod to Pod traffic tests from Worker 1 to Worker 2 using its Service IP (also known as its Cluster IP or Virtual IP).\n\n3. Remote VM using Pod IP: Worker 3 to Worker 2 traffic tests using Worker 2 Pod IP.\n\n4. Remote VM using Cluster/Virtual IP: Worker 3 to Worker 2 traffic tests using Worker 2 Cluster/Virtual IP.\n\n5. Same VM Pod Hairpin: Worker 2 to itself using Cluster IP\n\nFor each test the MTU (MSS tuning for TCP and direct packet size tuning for UDP) will be linearly increased from 96 to 1460 in steps of 64.\n\n\n#### Output Raw CSV data\nThe orchestrator and worker pods run independently of the initiator script, with the orchestrator pod sending work items to workers till the testcase schedule is complete. The iperf output (both TPC and UDP modes) and the netperf TCP output from all worker nodes is uploaded to the orchestrator pod where it is filtered and the results are written to the output file as well as to stdout log. Default file locations are `/tmp/result.csv` and `/tmp/output.txt` for the raw results.\n\n**All units in the csv file are in Gbits/second**\n```console\nALL TESTCASES AND MSS RANGES COMPLETE - GENERATING CSV OUTPUT\nthe output for each MSS testpoint is a single value in Gbits/sec \nMSS , Maximum, 96, 160, 224, 288, 352, 416, 480, 544, 608, 672, 736, 800, 864, 928, 992, 1056, 1120, 1184, 1248, 1312, 1376, 1460\n1 iperf TCP. Same VM using Pod IP ,24252.000000,22650,23224,24101,23724,23532,23092,23431,24102,24072,23431,23871,23897,23275,23146,23535,24252,23662,22133,,23514,23796,24008,\n2 iperf TCP. Same VM using Virtual IP ,26052.000000,26052,0,25382,23702,0,22703,22549,0,23085,22074,0,22366,23516,0,23059,22991,0,23231,22603,0,23255,23605,\n3 iperf TCP. Remote VM using Pod IP ,910.000000,239,426,550,663,708,742,769,792,811,825,838,849,859,866,874,883,888,894,898,903,907,910,\n4 iperf TCP. Remote VM using Virtual IP ,906.000000,0,434,546,0,708,744,0,791,811,0,837,849,0,868,875,0,888,892,0,903,906,0,\n5 iperf TCP. Hairpin Pod to own Virtual IP ,23493.000000,22798,21629,0,22159,21132,0,22900,21816,0,21775,21425,0,22172,21611,21869,22865,22003,22562,23493,22684,217872,\n6 iperf UDP. Same VM using Pod IP ,6647.000000,6647,\n7 iperf UDP. Same VM using Virtual IP ,6554.000000,6554,\n8 iperf UDP. Remote VM using Pod IP ,1877.000000,1877,\n9 iperf UDP. Remote VM using Virtual IP ,1695.000000,1695,\n10 netperf. Same VM using Pod IP ,7003.430000,7003.43,\n11 netperf. Same VM using Virtual IP ,0.000000,0.00,\n12 netperf. Remote VM using Pod IP ,908.460000,908.46,\n13 netperf. Remote VM using Virtual IP ,0.000000,0.00,\nEND CSV DATA\n```\n\n##### Configuration\n\nThe following table lists the configurable parameters of the chart and their default values.\n\nParameter | Description | Default\n--------- | ----------- | -------\n`imagePullPolicy` | Whether to Always pull imaged or only IfNotPresent | IfNotPresent\n`images.orchestratorVersion` | Image version for the orchestrator | 1.1\n`images.workerVersion` | Image version for the worker | 1.1\n`debug.orchestrator` | Debug mode for the orchestrator  | false\n`debug.worker` | Debug mode for the worker| false\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrahbar%2Fk8s-testsuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrahbar%2Fk8s-testsuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrahbar%2Fk8s-testsuite/lists"}