I have an application (demoapp) in GKE which is exposed to internet with a GCE ingress like this:
- host: demoapp.com
http:
paths:
- backend:
serviceName: demoapp-service
servicePort: 80
The application has many customers with each customer having their own page with a path scheme like demoapp.com/customers/customer1 I'm rolling out a new version of the application (demoapp2) and would like to gather some feedback first from certain customers. Thus I'd like to route certain customer paths to the new application instead of the old so that the e.g. demoapp.com/customers/customer1 would resolve to demoapp2-service's path instead of demoapp-service's. This however doesn't seem work:
- host: demoapp.com
http:
paths:
- backend:
serviceName: demoapp2-service
servicePort: 80
path: /customers/customer1
- backend:
serviceName: demoapp-service
servicePort: 80
I've tried other variations, like adding path: /
or path: /*
to demoapp-service routing but I guess the working url would be demoapp.com/customers/customer1/customers/customer1 even if the default didn't override the path.
So next I thought that I could have something like this in demoapp nginx configuration:
location /customers/customer1 {
proxy_pass http://demoapp2-service/customers/customer1;
}
But that doesn't seem to work either and I don't see anything in logs. Does anyone know how to pull this scheme off?