<p>I have my react application and back end services running in a kubernetes cluster. I want my react application to access one end point by passign the API gateway. ( Withouts user login in)</p>
<p>Is there a way to use kuberentes internal cluster communication instead of going through the API gateway to fetch data only this perticular component before sending the page to the client.</p>
<p>I dont know how to implement this in React. But I can access my end points from React pod using the following url. http://..svc.cluster.local:/’</p>

Daham Navinda
<p>You want to use <a href="https://react.dev/reference/react-dom/server" rel="nofollow noreferrer">server-side APIs</a> in React to do the server rendering of the components. There are React frameworks that build with SSR capabilities like Next.js, Remix, and Gatasby. If you have a React App bootstrapped using create-react-app then it is just client-side rendering on your hand ATM. But you can extend it to have SSR features using a simple Node.js server. I suggest you move to a framework which already has SSR features.</p>
<p>Regarding your question related to k8s,</p>
<p>You should use a <code>ClusterIP</code> type service to expose the backend internally for serving SSR requests from the backend. The traffic flow for an SSR request and response will flow in a high-level view as below:</p>
<img src="https://i.stack.imgur.com/8hR6V.png" />
