Skip to content

ReWrite target annotation not working #585

@owenmorgan

Description

@owenmorgan

Hello, im testing out Istio, but i'm having issues with rewriting requests from ingress.

e.g.

I have Istio running from the Helm chart, all default configuration.

I have a demo application, which accepts requests from root.. so locally i can

docker run -p 80:80 my.registry.com/one-demo

Request: curl localhost/
Response: 200

I have this application running on my k8s, with an ingress record using the rewrite-target to /


apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: one-demo
  namespace: "{{.Values.namespace}}"
  annotations:
    kubernetes.io/ingress.class: istio
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /demo
        backend:
          serviceName: one-demo
          servicePort: 8080

Request: curl istiolb.mydomain.com/demo
Response: 404

Looking at the access log for my demo app, i see

request: "GET /demo HTTP/1.1"
Is there a way i can ensure that the request is re-written to the root path?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions