Running multiple server instances inside K8

I wrote my own server manager in Go to automatically start and stop dedicated server instances inside a Kubernetes cluster. Since I want to minimize latency I set the host-network param to true, therefore I cant map unreals default port (7777) to whatever port I want. I tried a lot with setting build args and env variables but I cant get it done right. Since I am not the only one hosting multiple server instances on the same ip maybe some can help me out how to get this done. Iam already aware of the -port=1234 argument for the server binary but I couldnt find a way to pass them correctly after the dockerimage was built. I think the best solution would be to set the port during runtime via env variables, and setting the variables when I start the pod. If anybody has experience with this and can help me out? :slight_smile:

fixed it myself → set the entrypoint executable within [] inside my Dockerfile and started the pod with args ‘-port=xxxx’ → then the args are automatically appended to the entrypoint and everythings works like a charm :slight_smile: