I am trying to access an external postgres from my pod. The problem is that in order to do this, I need to allow in the external database pg_hba.conf the "host address"/ "IP" of the pod. It is clear that I can temporarily use the address of the node, e.g. someNode.online-server.cloud.
The problem is that of course, if the pod restarts, it might restart on another node. For the converse problem, I could use a service/endpoint that would provide an anchor for all external traffic to go through... Is there a way to do something like this in my case? I am thinking port forwarding on a host can be both ways, but not sure what to do in K8s.