How to connect linode kubernetes node to linode managed postgres running in its own cluster.
I understand they are in different network. My app runs on linode cluster while i have my postgres database in the linode managed postgres cluster. I tried using the host address given by my postgres db but my app still can't connect. Please can someone help me ?
I tried creating a an ExternalName service but i got error log
server error (FATAL: no pg_hba.conf entry for host │
│ panic: Failed to connect to database <<.
What am i doing wring ?
I’d like to start with the caveat that our LKE service and our Managed Database service aren’t specifically designed to work together. That means we don’t have documentation written to specifically help with this.
That said, as long as they are in the same Data Center, it should be possible. I’d be happy to try to provide some resources to help you—or anyone who comes across this post in the future—to try to figure this out.
First, we have another Post about connecting LKE to a Managed Postgres Database that might be a good starting point. Next, I’d recommend starting by making sure that your Access Controls have the correct IPs included. You can add the private IP range rather than individual IPs to connect your entire LKE cluster. You can also check out our guide to Connecting to Managed Postgres Clusters.
Next, I looked into the information you shared to see if there was anything else beyond those guides that may help and wanted to pass along the following resources:
- connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host
- Kubernetes Services -Type ExternalName
- Cannot Connect to External Database from Kubernetes Pod
Because of the managed nature of our Database Clusters, you may find you lack access to certain files or functions that make them not the right choice for you. While I do believe this is something you can set up, I wanted to also let you know we have a new Marketplace App for Deploying Postgres Clusters that you have more control over in case you decide to look for alternatives.