I have two servers A with private ip address and B with private ip address on server A I have a docker container that runs postgres database On server B have a pod that tries to connect to that database The problem when I run this command line on server B psql -h -U user -d mydb -p 15432 It works and I can access to database but when I go inside the pod and run it it doesn't work it's like it can't reach out that ip address Is there a way to fix this?

kubectl get pod mypodname -o jsonpath='{.status.podIP}'

give this


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.