title: Kubernetes Ingress backend subpath
body: <p>Is it possible in any way to redirect a hostpath to a subpath on the backend? Similar how <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="nofollow noreferrer">subPaths</a> work for volumes.</p>
  
  <p>The ingress would look like this:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: jupyter-notebook-ingress
    annotations:
      kubernetes.io/ingress.class: nginx
  spec:
    rules:
      - host: jptrntbk.MYDOMAIN.com
        http:
          paths:
            - path: /
              backend:
                serviceName: jupyter-notebook-service
                servicePort: 8888
                subPath: /lab
  </code></pre>
  
  <p>Navigation to <code>jptrntbk.MYDOMAIN.com</code> would redirect to <code>/lab</code> on the backend and all other parentpaths are unavailable.</p>