This project is a collection of Golang tools for container port scanning, container memory stress testing, and container CPU stress testing. These tools can help you perform performance testing and resource utilization evaluation on containers.
This tool is used to scan the open ports inside a container to ensure the container's network configuration is correct and the ports are accessible.
kube-tools scan -H baidu.com -T tcp -P 80,443
- -H, --host string host to scan (default "localhost")
- -P, --ports string ports to scan (default "22")
- -T, --protocol string protocol to scan (default "tcp")
This tool is used to simulate memory usage to test the container's memory resource utilization.
kube-tools memory -P 8888 -S 10240
- -P, --port string Port to listen on (default "8080")
- -S, --size int Memory size in MB
kube-tools metric -P 8080
- -P, --port string ports to scan (default "8080")
kube-tools traceroute --host localhost
- -H, --host string host to scan (default "localhost")
kube-tools cpu --cores 5 --minutes 1
- -C, --cores int the number of cores to use. (default 1)
- -M, --minutes int the minute time to run the simulation. (default 1)
kube-tools token --issuer kubernetes --username osadmin --password password --port 8888 --expire 5200
{
"access_token": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwicGFzc3dvcmQiOiJwYXNzd29yZCIsImV4cCI6MTY5MTg1ODczMywiaXNzIjoiaXNzdWVyIn0.KBEOkIAYuuGiLoJyqrZnkyRs9OdvOL8qrtnu_eWWR2k",
"expire_time": 1691858733
},
"refresh_token": {
"expire_time": 1694443533,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNjk0NDQzNTMzLCJpc3MiOiJpc3N1ZXIifQ.8KItuXDDnSef5FBiUe1pBeSOJoC2S0Iv88a51Yiy5TM"
}
}
- -E, --expire duration The token expire time, default 7200s. (default 7.2Β΅s)
- -I, --issuer string The issuer of the token. (default "issuer")
- -W, --password string The password of the token. (default "password")
- -P, --port string The http web service listening port. (default "8080")
- -U, --username string The username of the token. (default "admin")
If you find any issues or have any improvement suggestions, feel free to raise an issue or submit a pull request. We welcome your contributions!
This project is licensed under the Apache License. See the LICENSE file for details.