google / kctf

kCTF is a Kubernetes-based infrastructure for CTF competitions. For documentation, see
https://google.github.io/kctf/
Apache License 2.0
665 stars 73 forks source link

Start all challenges at once? #396

Open h4sh5 opened 1 year ago

h4sh5 commented 1 year ago

Suppose there are 20+ challenges, is there support for kctf to start all of them at once? Since its tedious to go into each folder and start them individually.

sroettger commented 1 year ago

Do you need it to happen in parallel or just want it automated?

For the latter, wouldn't a simple bash loop do the trick?

for yaml in */challenge.yaml; do pushd "$(dirname $yaml)"; kctf chal start; popd; done`
guozhen-dev commented 2 months ago

I have a quick question regarding to using kctf host many challenages. Since kctf assign a load balancer to every chal, thus the load balancer cost for running 20 challanges is pretty high, do you know any way to reduce that cost ?

sroettger commented 2 months ago

I have a quick question regarding to using kctf host many challenages. Since kctf assign a load balancer to every chal, thus the load balancer cost for running 20 challanges is pretty high, do you know any way to reduce that cost ?

It's certainly a pain point but we haven't found a good solution to it yet. It might be possible to use a single global load balancer that forwards traffic to all nodes on all ports. https://cloud.google.com/load-balancing/docs/internal#all_ports It would probably require changing the operator, i.e. instead of creating a load balancer service for every challenge, it would just have to create a NodePort that you can send traffic to. And probably a bunch of features like DNS and ip source restrictions will not work out of the box.

If you try it out, please let us know how it went :).

cc: @sirdarckcat