# Pods communication \[Solved\]

**URL:** <https://forums.suse.com/t/pods-communication-solved/14084>\
**Category:** SUSE Rancher Prime\
**Created:** [April 25, 2019, 3:45pm UTC](https://forums.suse.com/t/pods-communication-solved/14084 "2019-04-25T15:45:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dc.901](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dc.901](https://forums.suse.com/u/dc.901)\
**Post date:** [April 25, 2019, 3:45pm UTC](https://forums.suse.com/t/pods-communication-solved/14084/1 "2019-04-25T15:45:24Z")

</div>

Hello,  
I have cluster running on rancher 2.2.1

I have two containers:  
xibosignage/xibo-xmr  
and  
xibosignage/xibo-cms

xibo-cms needs to communicate with xibo-xmr via TCP/50001  
There will be clients that will communicate with xibo-xmr via TCP/9505

So, I tried to create Ingress rule, but seems like I can only setup one of these ports for Ingress.

I am not sure how to resolve this?

Thank you!

---

<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 25, 2019, 4:05pm UTC](https://forums.suse.com/t/pods-communication-solved/14084/2 "2019-04-25T16:05:04Z")

</div>

Ingress is for exposing something that sPeaks HTTP to the outside world and routing based on the request. If you have two things that want to communicate within the cluster, they can just talk directly to each other through a ClusterIP service.

---

<div class="post-metadata">

**Author:** ![dc.901](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dc.901](https://forums.suse.com/u/dc.901)\
**Post date:** [April 25, 2019, 4:36pm UTC](https://forums.suse.com/t/pods-communication-solved/14084/3 "2019-04-25T16:36:15Z")

</div>

Thanks Vincent!  
Here is what I did:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/4/4d433c04805bd28db1a1473ebb474e73b0f2cde4.png)

Used HostPort for TCP/9505 because that is for clients (outside the container network)  
ClusterIP (TCP/50001) for xibo-cms to communicate with xibo-xmr…

Now, my question is where do I find the IP to specify as destination for both sources?

---

<div class="post-metadata">

**Author:** ![dc.901](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dc.901](https://forums.suse.com/u/dc.901)\
**Post date:** [April 25, 2019, 5:01pm UTC](https://forums.suse.com/t/pods-communication-solved/14084/4 "2019-04-25T17:01:16Z")

</div>

I resolved this I think; used HostPort for both TCP/9505 and TCP/50001  
Then setup Node Scheduling to always run this container on one node; this will be a problem if node does go down. But, since I have another container that needs to talk to this one, I think this is probably my best option.

---

<div class="post-metadata">

**Author:** ![Fraser\_Goffin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/fraser_goffin/32/6608_2.png) [@Fraser\_Goffin](https://forums.suse.com/u/Fraser_Goffin)\
**Post date:** [April 27, 2019, 12:55pm UTC](https://forums.suse.com/t/pods-communication-solved/14084/5 "2019-04-27T12:55:26Z")

</div>

Using node ports for external access is a bit limiting IMO, you would be better off using Ingress (node ports also force callers to have knowledge of the ports you use so are somewhat of a leaky abstraction). For pod 2 pod communication just route internally per Vincent’s suggestion.
