title: kubernetes - expose app on a single endpoint
body: <p>I'm a beginner at kubernetes and looking to build a setup locally (on minikube) where the frontend pod (react app) fetches values from the backend pod.</p>
  <p>The frontend application is a built react app which contains the static files.
  The backend is a python app exposed on port 5000.</p>
  <p>The frontend yml file:</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: fe-nginx
    labels:
      app: fe-nginx
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: fe-nginx
    template:
      metadata:
        labels:
          app: fe-nginx
      spec:
        containers:
        - name: fe-nginx
          image: fe_img:latest
          imagePullPolicy: Never
          ports:
          - containerPort: 80
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: fe-service
  spec:
    selector:
      app: fe-nginx
    ports:
      - protocol: TCP
        port: 80
        targetPort: 80
  </code></pre>
  <p>Backend yml:</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: be-python
    labels:
      app: be-python
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: be-python
    template:
      metadata:
        labels:
          app: be-python
      spec:
        containers:
        - name: be-python
          image: be_app:latest
          imagePullPolicy: Never
          ports:
          - containerPort: 5000
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: be-service
  spec:
    selector:
      app: be-python
    ports:
      - protocol: TCP
        port: 5000
        targetPort: 5000
  </code></pre>
  <p>Being a react app when the frontend app, it's the browser that makes the request from the values to the backend pod. What's the best approach to make this work on a single endpoint ?</p>
  <p>Thanks in advance.</p>