<p>Once again I shall require help from Stack Overflow :).</p>

<p>We have a fresh public access endpoint EKS Cluster, an app inside the nodes that return something from the RDS. 
The VPC of the cluster is VPC peering with the private VPC that holds the RDS. We also have <strong>Accepter DNS</strong> resolution <em>enabled</em>. The Accepter is the RDS VPC.</p>

<p>When SSH-ing into my worker nodes, and we telnet the RDS, it resolves it. 
Initially, the Connection String was establish with the Endpoint. It didn't reach the database. I changed it to the IP of the RDS and it worked.</p>

<p>When doing with the DNS names, it takes:</p>

<p>1) lots of time to load, </p>

<p>2) </p>

<blockquote>
  <p>"<em>Unable to retrieve Error: Timeout expired. The timeout period
  elapsed prior to obtaining a connection from the pool. This may have
  occurred because all pooled connections were in use and max pool size
  was reached.</em>"</p>
</blockquote>

<p>Therefore I was wondering if any of you faced this issue and how you solved it? There seems to be a lot of fun regarding DNS resolution with EKS and I'm not exactly sure why the instance can resolve but not the pod.</p>

<p>Thank you for your help!</p>

<p>Okay so we found the answer!
It was SO LONG to find it, so i'm gonna save you that trouble if you happen to have the same problem/configuration than us.</p>

<ol>
<li>You need port 53 outbound in NaCL and SG. That's the way kubernetes checks DNS. (<a href="https://stackoverflow.com/questions/52276082/dns-problem-on-aws-eks-when-running-in-private-subnets?rq=1">DNS problem on AWS EKS when running in private subnets</a>)</li>
<li>In the connection string, Data source, we previously had "Data Source=DNSName;etc". We changed it to "Data source=tcp:DNSName". </li>
</ol>

<p>That was it</p>

<p>2 days for that.
:D</p>

<p>EDIT: I might add I faced the same problem in another environment/aws account (53 was the answer but slightly differently): <a href="https://stackoverflow.com/questions/59662585/pods-in-eks-cant-resolve-dns-but-can-ping-ip/59788764#59788764">Pods in EKS: can&#39;t resolve DNS (but can ping IP)</a></p>
