/k8s-scaling-watcher

Web stress testing tool that can bypass most if not all security features by using browser inside containers with vpn.

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0

Goal

This is a web stress testing tool and can be used for other testing purposes. It can be hard to test your web application because of security and/or other reasons. This tool allows to bypass most if not all of security features. This is done by creating containers with vpn and browsers that go to specified link and execude specified js code.

Warning

This tool is really slow and uses a LOT of memory. Please use this tool only as last resort if everything else fails

Before setup

Linux

Windows

Networking

template-deployment.yaml and deployment.yaml are configured to use flannel. If you want to use something else you'll need to reconfigure dns settings inside the deployment.

Setup

  1. Run setup.sh.
chmod +x setup.sh
./setup.sh

This wil generate 2 docker images and deployment file for kubernetes.

  1. Put all .ovpn files in to vpn_configs folder.
    If configs have passwords create a file inside vpn_configs with username and password as follows:
username
password

Then link config files to password inside vpn-settings.json. See user documentation for more detailed explanation.

  1. Change linkToGo and other settings in settings.json

  2. Change browser-script.js with script you want to run.
    Everything in browser-script.js will be executed when the browser page is loaded.

Usage

  1. Run deployments and services from file
kubectl apply -f deployment.yaml

deployment.yaml by default has 5 replicas of executors

  1. Rescale container count
kubectl scale deployments/executor --replicas=5

Or send POST request to http://controller/replicas with {'amount': 5}

Remove all containers

kubectl delete -f deployment.yaml

Project structure and other docs

For contributing or making your own changes see project structure.
For documentation see user documentation.