trying to open Postgres port 5432 so it can be accessible from my local machine. the port is only open from kubernetes pods.
127.0.0.1:5432 <====> kubernetes-pod <=====> Postgres Server
basically I want to make port 5432 accessible via my local machine, the port is only accessible from kubernetes-pod. how do I do that.
I tried which I think this would work if postgres server is running on the same pod which is not in my case:
kubectl port-forward pod-5bf5c7df9b-xcjsf 5433:5432
Note: The PostgreSQL server runs as standalone db server and only the pod can access the port and I want to access the PostgreSQL db port from my local machine .