Port forwarding to multiple pods
Is your feature request related to a problem?
Here's the use case:
I want to test the horizontal scalability of my server. I set 2 replicas of my server and run devspace dev.
However, the port is forwarded to just one pod. So I can't really know whether using two ports works.
However it's inconvenient if you just want to quickly try out the scalability of your server.
Which solution do you suggest?
Add an option for simple load balancing.
Which alternative solutions exist?
I can do a workaround with kubernetes or I make two deployments with different, but identical images. Then I forward those deployments to different ports and try out both at the same time.
Additional context
/kind feature
@FlorianKutz thanks for creating this issue! The problem with port-forwarding to multiple pods is that you cannot use a local port twice, so we would need to automatically allocate other ports for this. I'm not sure if we should allow this, since configuration is not clear for me here. What would you expect to happen locally, which ports should get allocated?
Also just ran into this (except working on a consensus algorithm) so I'd just like syncing to be done between several pods and it doesn't matter to me which pod gets my forwarded traffic. Even in the original case given by @FlorianKutz, I suspect it doesn't matter which pod gets the forwarded traffic since they're testing scalability -- but also probably want files synced.
Would it be possible to have forwarded ports going to a k8s service?