I have two service serviceOld serviceNew
I want to achieve the following effect
http://host/any => http://serviceOld/any
http://host/any/aaa => http://serviceOld/any/aaa
http://host/feature => http://serviceNew/feature
http://host/feature/bbb => http://serviceNew/feature/bbb
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/canary: "true"
nginx.ingress.kubernetes.io/canary-by-header: new
nginx.ingress.kubernetes.io/rewrite-target: /
name: v2
namespace: api
spec:
rules:
- host: xxx.com
http:
paths:
- path: /
backend:
serviceName: serviceOld
servicePort: 80
- path: /feature/*
backend:
serviceName: serviceNew
servicePort: 8080
I tried multiple methods and failed to achieve the goal. Can anyone help me?