0

I have two servers A with private ip address 10.1.0.2 and B with private ip address 10.1.0.4 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 10.1.0.2 -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 10.1.235.180

0

Your Answer

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