We have internal load balancer, where the request is coming to a instance group which is basically the sets of VM.
Load Balancer -> Instance Group (our service is running on the Port 8080)
Since we need to redirect one of the request to some other domain, this is done in order to test our new service
Load Balancer -> Send Request to VM 1 at port 8080 -> Redirect it newservice.com/filter=<with arguments>
-> VM 2 and VM 3 service is running on port 8080
What's the correct way to do that ? Since new service is not in the same gcp project, any help how we should achieve it ?
I have simple nginx configuration :
server {
listen 80;
server_name MY-MACHINE-IP (VM 1)
return 301 https://newService.com$request_uri;;
}
But no redirection is happening
There are only 3 ways to make cross-project connections possible: Shared VPC, Cloud VPN or VPC Peering. You may choose the option that most suits your use-case. I would try VPC Peering first.