<p>I am trying to run an application in Kubernetes that will be accessed via ingress control from the outside world. The ingress will add a path '/applicationName' and for which I need to configure the reverse proxy setting on the application. What is the best way to handle this requirement in kubernetes ?</p>

<p>I have tried few workarounds like putting the cluster or almsmart-nginx-ingress-controller.my-app.svc.cluster.local to resolve IP etc but I am not convinced with the approach.</p>

<p>Any suggestions ? Thanks in Advance.</p>

Gaurav Sharma
<p>The path in your ingress should point to the service and its port and your DNS need to point to ingress IP. If you are running on the cloud infrastructure, then  Ingress(<a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">one of the ingress implementations</a>) will be behind Service of Type=LoadBalancer(so point your DNS to that), and then requests received by the Ingress will be forwarded to services, depending on the Host and Path in the request.</p>

<p>Here is a sample of a spec part  of an ingress object:</p>

<pre><code>spec: rules: 
  - host: first.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: firstservice
          servicePort: 80
  - host: second.example.com
    http:
      paths:
      - path: /
        backend:
          serviceName: secondservice
          servicePort: 80
</code></pre>
