When setting the pod's hostNetwork to true, why do we have to specify which ports to use?

Hi, first of all, I apologize for my English and questioning skills.

The following document states that the ports used must be specified when setting the hostNetwork to true. (Pod | Kubernetes)

The point is, why “must” ports be specified?

Even if ports are not specified, the application seems to work well from the ‘load balancer type service’ or access to the node directly.

I am challenging coturn(GitHub - coturn/coturn: coturn TURN server project) over k8s for the application of webrtc technology.
In the case of coturn, it is unusual, so there are more than 10,000 ports in use. (This is called relay port in coturn)
Under these restrictions, it is difficult to specify ports.

I apologize again for my English and questioning skills. Thank you for reading.

That doc seems to be wrong

1 Like