I've setup a kubernetes cluster in my network and a postgres database in same network. I am able to connect my java app to my postgres database if I run it over in a container or a VM. But some how when I deploy the same app in Kubernetes it is not able to connect to my database. All my services are in my private network and my cluster is a bare metal setup in my home lab using calico network.
I also tried ping my database ip from a busybox pod but that also fails.