I am running the React Application on Spring Boot which runs as containers in Kubernetes. When the react application interacts with the backend through REST, It should resolve the dns of the REST URI.
I have tried directly giving the service name(i.e. while calling the REST API from react application i have given the https://service-name:port/api/v1/test/), but it is not working.
In case your backend is on another namespace use the following format:
<service-name>.<namespace-name>.svc:portFor a Kubernetes service demo-ser on demo namespace the URL will be something like:
https://demo-ser.demo.svc:8080/