I have a Docker container that reads a variable which I provide to it during the execution. Then I though that I would like to run many of those and pass a different value as variable for each one of those. Then, I just created a simple text file which contains all the values I want to pass into (they are about 20k different ones) and I am using gnu-parallel
to spawn multiple Dockers in parallel.
My question is how I could do something like that in a Kubernetes environment?
Sounds like you want you want to do can be achieved using kubernetes jobs. I would advise against using gnu parallel on kubernetes unless you can fit all the jobs in one node. If this is the case I think it's ok, just set the cpu request in the job template.