<p>The app consists of 3 components: frontend, backend and Redis. The frontend communicates only with the backend, the Redis service communicates only with the backend service. All pods run correctly, at least logs don't show anything disturbing.</p>
<p>The backend is built with NodeJS/ExpressJS, the frontend: with React.</p>
<p>Services are configured in the following way:</p>
<p><code>frontend:</code></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
  name: plg-frontend
  labels:
    name: plg-frontend-service
    app: playground-app
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
    nodePort: 30010
    protocol: TCP
  selector:
    name: plg-frontend-pod
    app: playground-app
</code></pre>
<p><code>backend:</code></p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
  name: plg-backend
  labels:
    name: plg-backend-service
    app: playground-app
spec:
  ports:
  - port: 4000
    targetPort: 5011
  selector:
    name: plg-backend-pod
    app: playground-app
</code></pre>
<p>All services run correctly:</p>
<pre><code>kubectl get svc
NAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
plg-backend       ClusterIP   10.233.23.12   &lt;none&gt;        4000/TCP       2d3h
plg-frontend      NodePort    10.233.63.20   &lt;none&gt;        80:30010/TCP   2d3h
redis             ClusterIP   10.233.59.37   &lt;none&gt;        6379/TCP       2d3h
</code></pre>
<p>At the moment, the frontend running on host's IP, let's say <a href="http://10.11.12.13:30010" rel="nofollow noreferrer">http://10.11.12.13:30010</a>, tries to call the backend's internal endpoint, so 10.233.23.12:5011 (the backend's <code>targetPort</code>). Connection times out. Should I expose the backend service to become <code>NodePort</code> to be accessible?</p>

AbreQueVoy
<p>No need to expose using NodePort unless you intend to let the backend service accessible on the host network. Your frontend should be calling 10.233.23.12:<strong>4000</strong>, not 5011 which is the backing pods listening on.</p>
