<p>I have 3 services currently running on the gcloud kubernetes platform. </p>

<p>The frontend connects to the backend via a graphql query and asks for some data. This query is forwarded to another service which is responsible for the specific type of data i.e "bread". </p>

<p>So you have frontend (react/next.js) -> backend #1 (graphql) -> backend #2 (graphql)</p>

<p>All of these can communicate within the cluster, I can check the logs via "kubectl logs podname".</p>

<p>The logs basically say:</p>

<ol>
<li>Backend #1: Received query</li>
<li>Backend #2: Received query (this is where it queries the database).</li>
<li><p>Backend #1: </p>

<p>,"level":50,"msg":"Failed to fetch bread from breadservice. FetchError: request to <a href="http://bread-service/graphql" rel="nofollow noreferrer">http://bread-service/graphql</a> failed, reason: connect ETIMEDOUT some.ip.address:15\n  </p></li>
</ol>

<p>I am not sure why this timeout error occurs. All the services can communicate successfully. </p>

BURGERFLIPPER101
<p>I suggest to use apollo-gateway for the same, you can find details <a href="https://www.apollographql.com/docs/apollo-server/federation/implementing/" rel="nofollow noreferrer">here</a>, this will add a gateway layer in between where you can define all the URLs of the services those are supposed to communicate with each other.</p>

<p>And just expose the gateway via ingress.</p>

<p>And in the above case, I guess you are missing the port number of the service</p>

<pre><code>http://bread-service:port/graphql 
</code></pre>

<p>Try this, I guess this should be working.</p>

<p>But do have a look at that link, for microservices that looks good for implementation, I am also exploring the same</p>
