title: Rewrite context path for Google Kubernetes Engine Ingress Controller
body: <p>I have an application running in the tomcat path /app1, how should I access this from the ingress path? </p>
  
  <p>When accessing "/", it gives the default tomcat 404 - not found page, and when accessing via /app1 it shows "default backend -404" </p>
  
  <p>What I wanna know is:
  Is there anyway to configure the context path without using ngnix's ingress controller? (Just using GKE's default ingress controller)</p>
  
  <p>Here is a sample of my ingress:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: gke-my-ingress-1
    annotations:
      kubernetes.io/ingress.global-static-ip-name: gke-my-static-ip
      networking.gke.io/managed-certificates: gke-my-certificate
  spec:
    rules:
    - host: mydomain.web.com
      http:
        paths:
        - path: /
          backend:
            serviceName: my-service
            servicePort: my-port
  </code></pre>
  
  <p>Edit: service output</p>
  
  <pre><code>kubectl get svc
  my-service   NodePort    &lt;IP_REDACTED&gt;   &lt;none&gt;        8080:30310/TCP   5d16h
  </code></pre>
  
  <pre><code>kubectl describe svc my-service
  Name:                     my-service
  Namespace:                default
  Labels:                   &lt;none&gt;
  Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                              {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"my-service","namespace":"default"},"spec":{"ports":[{"name"...
  Selector:                 app=my-deployment-1
  Type:                     NodePort
  IP:                       &lt;IP_REDACTED&gt;
  Port:                     my-port  8080/TCP
  TargetPort:               8080/TCP
  NodePort:                 my-port  30310/TCP
  Endpoints:                &lt;IP_REDACTED&gt;:8080
  Session Affinity:         None
  External Traffic Policy:  Cluster
  Events:                   &lt;none&gt;
  </code></pre>
  
  <p>and this is my Node Port service yaml:</p>
  
  <pre><code>---
  apiVersion: v1
  kind: Service
  metadata:
    name: my-service
  spec:
    ports:
    - name: my-port
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      app: my-deployment-1
    type: NodePort
  </code></pre>