We have application that is running inside a pod, to access that I have created the service and exposed it. The route-url is for example : example-city.apps.cluster.com to access my application say server There is any Rest-API calls where, I get json data in which one the field is URL which is mapped to pod-name:80 through my application.
There is client application which get's connected to these server using route-URL, once it is connected there are Rest-API calls, that give me back the json data. As, in json data I don't have route-url but pod-name:80, my application does get connected to it.
So, what I am looking for is, my json data when it does in response, I need to change that pod-name:80 to route-url, in short I want to replace my pod-name with route-url ie. I want to rewrite-response.
Please suggest, how can we do these and what all changes are required in service or route yaml files.
What about deploying an additional reverse proxy like nginx for the purpose of rewriting?
Firstly, you need to deploy Nginx using a ConfigMap.
Then, you can do rewriting in ConfigMap