title: GKE Ingress not respecting rewrite rule
body: <p>Running a cluster on Google Container engine. </p>
  
  <p>Expect it to respect rewrite rule. Running the debug <a href="http://gcr.io/google_containers/echoserver:1.4" rel="noreferrer">echo server</a> it shows it's not respecting the http-rewrite rule as documented here in <a href="https://github.com/kubernetes/ingress/blob/827d8520ae070db695cf32859148ef08c9c37016/examples/rewrite/nginx/README.md#L17" rel="noreferrer">kubernetes ingress docs</a>.</p>
  
  <p>Works locally on minikube just fine. The <code>realpath</code> parameter still has debug attached although rewrite is on to strip after match. Expect <code>/foo/bar/</code> vs <code>/debug/foo/bar</code>.</p>
  
  <p>Attached </p>
  
  <p>URL + response </p>
  
  <blockquote>
    <p><a href="http://homes.stanzheng.com/debug/foo/bar" rel="noreferrer">http://homes.stanzheng.com/debug/foo/bar</a>
    <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>CLIENT VALUES:
  client_address=10.12.2.1
  command=GET
  real path=/debug/foo/bar
  query=nil
  request_version=1.1
  request_uri=http://homes.stanzheng.com:8080/debug/foo/bar
  
  SERVER VALUES:
  server_version=nginx: 1.10.0 - lua: 10001
  
  HEADERS RECEIVED:
  accept=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
  accept-encoding=gzip, deflate
  accept-language=en-US,en;q=0.8
  connection=Keep-Alive
  cookie=__cfduid=dfd6a6d8c2a6b361a3d72e3fc493295441494876880; _ga=GA1.2.5098880.1494876881
  host=homes.stanzheng.com
  upgrade-insecure-requests=1
  user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
  via=1.1 google
  x-cloud-trace-context=1586885dcac2d537189444861a8a462c/1232314719683944914
  x-forwarded-for=204.154.44.39, 35.190.78.5
  x-forwarded-proto=http
  BODY:
  -no body in request-</code></pre>
  </div>
  </div>
  </p>
  </blockquote>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: rewrite
    annotations:
      ingress.kubernetes.io/rewrite-target: /
  spec:
    rules:
    - host: minikube.homes
      http:
        paths:
        - path: /debug/*
          backend:
            serviceName: echoserver
            servicePort: 8080</code></pre>
  </div>
  </div>
  </p>