'Openshift routes are not redirected to particular service
I have deployed few services of my application on openshift : E.g., app-ui, app-backend,app-store ,main. I have defined separate routes for these services to access externally.
- app-ui -- ui.test-dev.***.net
- app-backend -- backend.test-dev.***.net
- app-store-- store.test-dev.***.net
- Main -- test-dev.***.net I have defined these DNS using host property in route in openshift yaml file.
The issue is when I m trying to access app-ui, i am getting the response from app-backend,similarly when I am checking app-store or main app , i am getting random response from any of these services. I m not sure why it's not able to redirect to correct service based on the route .Can anyone please help me on this ??
Solution 1:[1]
Validate the following in the route
- Path
- Service "should be the one of the app you are directing to"
- Target port "that it's going to the port of the app you want to expose"
How to check above?
oc describe route <route name>
In the output, check all above ones to troubleshoot.
Good luck
Solution 2:[2]
I think you have to validate Route as well as service to check whether it is pointing to the right one with a selector pod or not.
for this you can run the following commands:
oc get routes <route-name>
oc describe routes <route-name>
oc describe service <service-name>
example: * This consist resource names that i used in openshift env. so don;t get confuse.
Step 1:
oc get routes <route-name>
Step 2:
oc describe routes dev-route
here you can validate Service and Endpoint values
Step 3:
oc describe service farnodes-web-svc
here you can validate Selector, Type, Port & TargetPort
In the output, Follow all above steps to troubleshoot. Post back over here.
Good luck!!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sam |
Solution 2 | swetank soni |