<p><strong>Background:</strong> I have a kubernetes cluster set up in one AWS account that needs to access data in an RDS MySQL instance in a different account and I can't seem to get the settings correct to allow traffic to flow.</p>

<p><strong>What I've tried so far:</strong> </p>

<ul>
<li>Setup a peering connection between the two VPCs. They are in the same region, us-east-1. </li>
<li>Created Route table entries in each account to point traffic on the corresponding subnet to the peering connection. </li>
<li>Created a security group in the RDS VPC to allow traffic from the kubernetes subnets to access MySql. </li>
<li>Made sure DNS Resolution is enabled on both VPC's.</li>
</ul>

<p><strong>Kubernetes VPC details (Requester)</strong></p>

<p>This contains 3 EC2's (looks like each has its own subnet) that house my kubernetes cluster. I used EKS to set this up.  </p>

<p>The route table rules I set up have the 3 subnets associated, and point the RDS VPC CIDR block at the peering connection. </p>

<p><strong>RDS VPC details (Accepter)</strong></p>

<p>This VPC contains the mysql RDS instance, as well as some other resources. The RDS instance has quite a few VPC security groups assigned to it for access from our office IP's etc. It has Public Accessibility set to true. </p>

<p>I repeated the route table setup (in reverse) and pointed back to the K8s VPC subnet / peering connection.</p>

<p><strong>Testing</strong> </p>

<p>To test the connection, I've tried 2 different ways. The application that needs to access mysql is written in node, so I just wrote a test connector and example query and it times out. </p>

<p>I also tried netcat from a terminal in the pod running in the kubernetes cluster. </p>

<pre><code>nc -v {{myclustername}}.us-east-1.rds.amazonaws.com 3306
</code></pre>

<p>Which also times out. It seems to be trying to hit the correct mysql instance IP though so I'm not sure if that means my routing rules are working right from the k8s vpc side.</p>

<pre><code>DNS fwd/rev mismatch: ec2-XXX.compute-1.amazonaws.com != ip-{{IP OF MY MYSQL}}.ec2.internal
</code></pre>

<p>I'm not sure what steps to take next. Any direction would be greatly appreciated.</p>

<p><em>Side Note: I've read thru this <a href="https://stackoverflow.com/questions/31972109/kubernetes-container-connection-to-rds-instance-in-separate-vpc">Kubernetes container connection to RDS instance in separate VPC</a>
I think I understand what's going on there. My CIDR blocks do not conflict with the default K8s ips (10.0.</em>.<em>.) so my problem seems to be different.</em> </p>

<p>I know this was asked a long time ago, but I just ran into this problem as well.</p>

<p>It turns out I was editing the wrong AWS routing table! When I ran <code>kops</code> to create my cluster, it created a new VPC with its own routing table but also another routing table! I needed to add the peer connection route to the cluster's routing table instead of the VPC's Main routing table.</p>

<p><a href="https://i.stack.imgur.com/d95W1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d95W1.png" alt="Routing tables"></a></p>
