<p>I am following this tutorial: <a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow noreferrer">https://cloud.google.com/container-engine/docs/tutorials/http-balancer</a>, but running it inside Minikube with <code>yml</code> files for each steps:</p>

<p><strong>Step 1: Deploy an nginx server</strong></p>

<p>production.yml:</p>

<pre class="lang-yaml prettyprint-override"><code>kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: pwa-app-production
  labels:
    app: MyApp
spec:
  replicas: 1
  template:
    metadata:
      name: app
      labels:
        app: MyApp
        env: production      
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
        ports:
        - name: nginx
          containerPort: 80
</code></pre>

<p>Then:</p>

<pre><code>$ kubectl apply -f production.yml
</code></pre>

<p><strong>Step 2: Expose your nginx deployment as a service internally</strong></p>

<p>service.yml:</p>

<pre class="lang-yaml prettyprint-override"><code>kind: Service
apiVersion: v1
metadata:
  name: pwa-frontend
spec:
  type: NodePort
  selector:
    app: MyApp
  ports:
  - name: nginx
    port: 80
    protocol: TCP
</code></pre>

<p>Then:</p>

<pre><code>$ kubectl apply -f service.yml
</code></pre>

<p>Verify the Service was created and a node port was allocated:</p>

<pre><code>$ kubectl get service pwa-frontend

NAME           CLUSTER-IP   EXTERNAL-IP   PORT(S)        AGE
pwa-frontend   10.0.0.28    &lt;nodes&gt;       80:30781/TCP   26m
</code></pre>

<p><strong>Step 3: Create an Ingress resource</strong></p>

<p>ingress.yml:</p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: pwa-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  backend:
    serviceName: pwa-frontend
    servicePort: 80
</code></pre>

<p>Then:</p>

<pre><code>$ kubectl create -f ingress.yml
</code></pre>

<p><strong>Step 4: Visit your application</strong></p>

<p>Find out the external IP address of the load balancer serving your application by running:</p>

<pre><code>$ kubectl describe ing pwa-ingress

Name:           pwa-ingress
Namespace:      default
Address:        192.168.99.100
Default backend:    pwa-frontend:80 (172.17.0.2:80)
Rules:
  Host  Path    Backends
  ----  ----    --------
  * *   pwa-frontend:80 (172.17.0.2:80)
Annotations:
  rewrite-target:   /
</code></pre>

<p>Every thing seems working well and all infos outputs seems to correspond to the tutorial. But now:</p>

<pre><code>$ curl 192.168.99.100

default backend - 404
</code></pre>

<p>I am assuming that you deployed the default nginx ingress controller by <code>minikube addons enable ingress</code>. The tutorial you followed is specifically for Google Container Engine, in those clusters there is a different ingress controller deployed which will create Google Cloud Load Balancers and is also capable of exposing plain TCP services. Your nginx ingress controller in minikube is only capable of processing HTTP ingresses like this:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: pwa-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: pwa-frontend
          servicePort: 80
</code></pre>

<p>Use <code>kubectl replace ingress.yml</code> after you modified your file and try your request again. </p>
