not working

Hi all,

I am trying to setup an Ingress on Kubernetes but I am facing a problem. I need to rewrite the request before it gets passed to the service and I saw that there is a kubernetes annotation that should handle this (rewrite-target) but it is not being considered.
I have the following ingress configuration that points to a service that is a simple image based on nginx with static content:

apiVersion: extensions/v1beta1
kind: Ingress
  name: test-ingress
  annotations: /
  - http:
      - path: /mni-ui
          serviceName: mni-webui
          servicePort: 80

and here is the output on nginx that shows that the request is being passed with the leading /mni-ui that I wished was removed from the request:

2017/08/16 16:16:09 [error] 6#6: *1948 open() "/usr/share/nginx/html/mni-ui" failed (2: No such file or directory), client:, server: localhost, request: "GET /mni-ui HTTP/1.1", host: ""

Is it the normal behaviour? Isn’t the rewrite-target annotation supported on k8s on rancher? Btw I am using RancherOS 1.6.5


1 Like