Kubernetes container connection to RDS instance in separate VPC Kubernetes container connection to RDS instance in separate VPC kubernetes kubernetes

Kubernetes container connection to RDS instance in separate VPC


With the help of Kelsey Hightower, I solved the problem. It turns out it was a Docker routing issue. I've written up the details in a blog post, but the bottom line is to alter the minions' routing table like so:

$ sudo iptables -t nat -I POSTROUTING -d <RDS-IP-ADDRESS>/32 -o eth0 -j MASQUERADE


Did you modify the source/destination checks as well?

Since your instance will be sending and receiving traffic for IPs other than the one assigned by your subnet, you'll need to disable source/destination checks.

See the image:https://coreos.com/assets/images/media/aws-src-dst-check.png