<p>I have a kubeadm cluster and i am trying to deploy to static websites using ingress (after installing the metalLB and nginx-ingress controller )</p>
<p>After deploying the ingress, i find that the ingress don't load the website assets (the html file only)
Please any help !</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: ingress-test
spec:
  ingressClassName: nginx
  rules:
  - host: k8s.example.k8s
    http:
      paths:
      - path: /app1
        pathType: Prefix
        backend:
          service:
            name: app1-svc
            port:
              number: 80
      - path: /app2
        pathType: Prefix
        backend:
          service:
            name: app2-svc
            port:
              number: 80

</code></pre>

Mohamed Rafraf
<p>Make sure your routing working properly with ingress</p>
<p>Example and it's not 404 for css:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - http:
        paths:
          - path: /?(.*)
            backend:
              serviceName: service
              servicePort: 3000
          - path: /api/?(.*)
            backend:
              serviceName: service
              servicePort: 5000
</code></pre>
<p>Read more at : <a href="https://github.com/kubernetes/ingress-nginx/issues/2557" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/issues/2557</a></p>
