<pre><code> I have an application running on 1001. I deployed it to a container in port 80.
</code></pre>

<p>How can I use Ingress for that?
I tried using NodePort with --targetPort=1001 and and I added 80 in servicePort in <code>Ingress.yaml</code>.</p>

<p>kubectl expose deployment test --target-port=1001 --type=NodePort</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: test
    servicePort: 80
</code></pre>

<p>I am getting error </p>

<blockquote>
  <p>Backend not found- 404</p>
</blockquote>

<p>Am I using the correct way or should I need to follow something else?</p>

<p>Setup nginx ingress using helm from the official kubernetes charts repo at <a href="https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress" rel="nofollow noreferrer">https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress</a>.</p>

<p>Along with the nginx ingress controller, you'll need an ingress resource too. Refer <a href="https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example" rel="nofollow noreferrer">https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/complete-example</a> for examples.</p>
