<p>My spring boot application needs to call or consume rest api from another spring boot application.
I want to use Kubernetes to manage my application and its multiple instances. But I am struggling to get rest-endpoint of another service.<br />
Lets say....
app1 calls app2,
app2 consume app3,
app4 calls app1 and app2.<br />
Here how should I get app1, app2.. app4 endpoint to communicate each other.
Can anyone help me with this scenario.</p>

<p>Usually you would use <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Kubernetes Services</a> for this communication. Each service can be accessed via its name in the cluster (<code>&lt;service_name&gt;.&lt;namespace&gt;.svc.cluster.local</code>).</p>
<p>So the solution is to define a Kubernetes ClusterIP service for each of your apps and then access them via those services. For example, if any application wants to access an HTTP service called &quot;app2&quot; in the &quot;default&quot; namespaces it would call <code>http://app2.default.svc.cluster.local</code>.</p>
