kubeshark / k8s-cluster-load-test

Configurable K8s cluster load test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable Kubernetes Cluster Load Test

This repository is useful for conducting load tests on your Kubernetes cluster.

Architecture

The load test is composed of two sets of either client or server pods:

  • N * k6-load-test
  • M * server

A total of M+N pods are launched, where N is the number of k6-load-test replicas, and M is the number of server replicas. Both replica numbers can be configured in the load-test.yaml manifest.

Configuration

    spec:
      containers:
      - name: k6
        image: alongir/k6-loadtest:latest
        env:
          - name: VUS       # concurrency level
            value: "300"
          - name: DURATION  # duration of keeping the load after a 20s ramp up
            value: "3h"
          - name: URL       # The URL to download
            value: "http://server.ks-load.svc.cluster.local/smap.png"
          - name: SLEEP     # Wait time between downloads
            value: "0"

Available Files to Download

505742B - http://server.ks-load.svc.cluster.local/smap.png

1024B - http://server.ks-load.svc.cluster.local/1k.png

12164B - http://server.ks-load.svc.cluster.local/ks_logo.png

Testing with TLS

All files are available also via TLS. Just replace http:// with https:// in URL value.

Replicas

Adjust the replicas fields for both deployments to control the number of server and client instances.

Start

kubectl apply -f load-test.yaml

Stop

kubectl delete -f load-test.yaml

About

Configurable K8s cluster load test

License:Apache License 2.0


Languages

Language:Shell 47.0%Language:Dockerfile 21.0%Language:JavaScript 19.6%Language:Python 12.4%