<p>I have a docker image with Nginx serving a static site. The site is served from a folder, lets call it "folder". When I request <a href="http://mydomain/folder/" rel="nofollow noreferrer">http://mydomain/folder/</a> it works. However when I request <a href="http://mydomain/folder" rel="nofollow noreferrer">http://mydomain/folder</a> it redirects to <a href="http://mydomain:8080/folder" rel="nofollow noreferrer">http://mydomain:8080/folder</a> which is the internal port used by the container. How can I prevent my ingress controller from adding the port?</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  generation: 1
  labels:
    app.kubernetes.io/instance: administration-env
  name: administration-env-erst-env
  namespace: default
  resourceVersion: "71710149"
  selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/administration-env-erst-env
  uid: c89014d2-60fe-11e9-8a63-000d3a2cc488
spec:
  rules:
  - host: mydomain
    http:
      paths:
      - backend:
          serviceName: administration
          servicePort: 8080
        path: /administration
  tls:
  - hosts:
    - mydomain
    secretName: some-tls-secret
status:
  loadBalancer:
    ingress:
    - ip: xx.xx.xx.xx
</code></pre>

user672009
<p>you can try as a workaround adding a proxy pass in your <code>nginx.conf</code></p>

<p>something like: </p>

<pre><code>location /folder {
  proxy_pass http://mydomain/folder/;
}

</code></pre>
