Openshift pod not discoverable, timed out

Tags: , , ,



I have three microservices I am deploying in openshift. Service A, B, C. A is a nodejs app, B is a java app and C again a java app. A nd B is exposed to outside world using routers. Both A and B uses C for processing data using C’s service URL.

Trivial depiction below:

A - a.com
B - b.com
C - c.default.cluster.local

A -> C
B -> C

Now the issue is from A, I am not able to connect to C, but from B I can connect to C. But from C both A and B is reachable.

A -> C - No
B -> C - Yes
C -> A - Yes
D -> B - Yes

There is following network policies:

1. Allow external calls to A
2. Allow external calls to B
3. Allow all pods in cluster's namespace to communicate, denying from other cluster and namespace.

Any pointers to above is highly appreciated.

Answer

For anyone with similar issue as a reference, it turned out all the deployment, service and policies in OCP was correct, but the issue was the container deployed in the pod.

While building image, we were using a proxy to install few tools in the image, which was inside the deployed container, breaking the communication to other pods. We removed the proxy from image after tool installation and it worked.

Taught me to cover or look from different angle for fixing issues.



Source: stackoverflow