Exposed gameserver ports #329
-
Hello, we have begun the process of migrating our legacy servers to Kubernetes using Shulker. However, we've noticed that the game server ports are being exposed to the host. Could you explain why this is happening and provide guidance on how to prevent the game server ports from being exposed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Hi! Really good question. It is actually an Agones behavior (see here). It's a bit unusual I agree with you. It is mainly because in most games, users connects directly to the servers and are not routed through a proxy. So having a dedicated port on the host avoids networks hops and so latency and overload on Kubernetes. Here we are not interested in this fast path, but I don't think we have control on that (but if we do I really should disable that!). One way of "solving" this is to have a "private" Kubernetes Cluster by having your game server nodes not exposed through the Internet directly (or with firewall rules). But I can understand that all clusters cannot be private especially if you are provisioning your own without cloud providers :/ |
Beta Was this translation helpful? Give feedback.
I have done an implementation that should fix the issue. It's merged, and I started a release. Let me know if everything is okay for you and your use cases.
Now, no ports will be bound, and Shulker will use headless internal DNS to route the proxies to the servers.
I'm not a big fan of this solution as it will load the DNS servers, but it's acceptable until I find something better.