Ingress resources are the gatekeepers of modern Kubernetes traffic management. Mosh, with its persistent SSH-like connection over UDP, doesn’t play by HTTP’s rules. That difference matters. Most Ingress controllers are built with HTTP and TLS termination in mind. Mosh asks for raw UDP traffic to flow directly, without translation or protocol meddling. If that isn’t configured right, your connection dies before the first keystroke lands.
The key is understanding how Kubernetes Ingress resources interact with Services and how these layers handle TCP versus UDP. By default, an Ingress doesn’t handle UDP at all. For Mosh to work, you either bypass HTTP-oriented Ingress rules or use an Ingress controller that supports UDP load balancing. NGINX Ingress, for example, requires extra ConfigMap entries and a separate UDP service mapping. Other controllers solve it differently, but the concept is the same: Ingress won’t magically pass UDP unless you make it.
Another common trap is port allocation. Mosh works across a range of UDP ports, usually 60000–61000. Cluster firewalls, cloud security groups, and node-level rules all have to allow that range. Miss one layer and you’ll be staring at a frozen terminal wondering why packets vanish mid-stream. The simplest approach is to explicitly define a Service in Kubernetes that maps the Mosh UDP range, then point your Ingress or load balancer to it.