<p>Given that Kubernetes doesn’t offer full visibility into how services interact with each other I want to derive and map services automatically. For eg as shown in the below diagram, how can we derive that the payment service interacts with the cart service and cart service interacts with catalogue and redis.</p>
<p>So far what I had tried is,</p>
<ol>
<li>kubectl get services command - This command only gives the list of services but does not hint on any communication happening between the services.</li>
<li>Tried Kubeview -&gt; This plots only the deployment architecture and gives a graphical representation but mapping between various services is not derived.</li>
</ol>
<p>So what is the easiest way to derive information about services interacting with each other and what could be the data source for this information in Kubernetes?</p>
<p><a href="https://i.stack.imgur.com/yMCLZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yMCLZ.png" alt="enter image description here" /></a></p>

Gokul
<p>We faced this as well when we were building Otterize -- we needed something to map &quot;who is talking to who&quot; in order to bootstrap our solution, but every tool seemed to be ill suited for the task of simply creating a &quot;network map&quot; without all sorts of stuff we didn't want. We ended up rolling our own, and open sourced it: <a href="https://github.com/otterize/network-mapper" rel="nofollow noreferrer">https://github.com/otterize/network-mapper</a> .</p>
<p>It's based on combining information from DNS queries (actually just query responses) as well as detecting open connections, which gives you an IP-level network map, and then adding a simple resolution heuristic to derive a logical name-level map. You can read more details in this blog post, by one of the guys who built the tool: <a href="https://otterize.com/blog/kubernetes-traffic-discovery" rel="nofollow noreferrer">https://otterize.com/blog/kubernetes-traffic-discovery</a> .</p>
<p>Hope this helps!</p>
