<p>I deployed simple .NET Core application consisting of 3 pods using Docker Desktop with Kubernetes.
My goals is to expose working web application in my host browser:</p>
<p><a href="https://i.stack.imgur.com/TO1jy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TO1jy.png" alt="enter image description here" /></a></p>
<p>My React Application in Fronend pod points in appsettings.js file to Backend Cluster IP Service to fetch data from backend. When im inside the Frontend pod this works normally, fetch works.</p>
<p>Exposed Fronend Pod using NodePort Service, application is accessible but my problem is with failing requests to Backend pod - requests are pointing to Backend ClusterIP service and my host machine cannot resolve them.</p>
<p>How this should be done on single node environment like Docker Desktop or Minikube?
It also should work if I would like to use multiple different backend apis in my frontend app.</p>
<p>Thanks for help!</p>

Daveo
<p>In your case, both Frontend and Backend need to be accessible from outside the cluster. So the Backend service must be of type <code>NodePort</code> or <code>LoadBalancer</code>.</p>
<p>The reason is that the Frontend does not interact with the Backend Service (in the cluster). The Frontend pod is just used by the browser to download your React application. Then the browser runs your React application. And this application - <strong>that does not run in your cluster</strong> - must consume the Backend Service. That is why the Backend Service must be externally accessible.</p>
