url rewriting - add Rewrite Rules 301 in nginx ingress controller -
how creating rewrite rules nginx ingress controller, in same way nginx able redirect.
like : (exemple) server_name www.foo.com; rewrite ^/search$ https://www.foo.com/all/search permanent;
this supported in latest (beta.3) version of ingress controller.
you set using annotations. have @ example here
essentially, when set ingress, you'll need specify so:
apiversion: extensions/v1beta1 kind: ingress metadata: annotations: ingress.kubernetes.io/rewrite-target: /search name: rewrite namespace: default spec: rules: - host: foo.com http: paths: - backend: servicename: my-service serviceport: 80 path: /all/search
Comments
Post a Comment