Springboot application in one pod not able to connect to mongodb on another pod through Openshift Springboot application in one pod not able to connect to mongodb on another pod through Openshift kubernetes kubernetes

Springboot application in one pod not able to connect to mongodb on another pod through Openshift


The issue is due to the pods and services in one project (namespace) are unable to access the pods and services in another project (namespace) in OpenShift.

All the pods and services in and can now access any pods and services in and vice versa using the following command.

$ oc adm pod-network join-projects --to=<project1> <project2> <project3>

Reference link - https://docs.openshift.com/container-platform/3.11/admin_guide/managing_networking.html