Report this

What is the reason for this report?

Is the managed cluster on DO can connect with Managed Database PostgreSQL database cluster by default ?

Posted on July 17, 2019
phuc

By phuc

I try to create a deployment to create a pod that will need a database to interact with. I configured a service with endpoints in the cluster to allow my pod to connect to Managed Database cluster in DO. When the pod created.It show error logs:

failed to open connection to database: pq: no pg_hba.conf entry for host "x.x.x.x", user "doadmin", database "testdb", SSL off\n"

As I guess that database cluster need to have a config to allow x.x.x.x (which I think it’s K8s cluster’s IP in DO).

Is there any confirmation that we don’t need additional setting on our K8s on DO and Managed Database PostgreSQL to allow those 2 can interact with each other as those was created with the same DO account.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.