# Load balance dynamic target ports

**URL:** <https://forums.suse.com/t/load-balance-dynamic-target-ports/6246>\
**Category:** Rancher 1.x\
**Created:** [April 26, 2017, 2:34pm UTC](https://forums.suse.com/t/load-balance-dynamic-target-ports/6246 "2017-04-26T14:34:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WheresAlice](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/wheresalice/32/2412_2.png) [@WheresAlice](https://forums.suse.com/u/WheresAlice)\
**Post date:** [April 26, 2017, 2:34pm UTC](https://forums.suse.com/t/load-balance-dynamic-target-ports/6246/1 "2017-04-26T14:34:34Z")

</div>

In Rancher it’s possible to assign a random port to a service, which is great - I can run multiple services on my one dev host and that works fine. But how do I add a load balancer that knows about those random ports? The UI asks for a specific port, but it feels like Rancher should already know enough about what ports are being used to just pick them itself.

Thanks  
Alice

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [April 26, 2017, 3:41pm UTC](https://forums.suse.com/t/load-balance-dynamic-target-ports/6246/2 "2017-04-26T15:41:41Z")

</div>

Load balancers talk to the target containers over the overlay network and use the actual port the container is listening on/exposing. You do not need to publish any ports on the target service, random or otherwise.
