I have a Kubernetes cluster running on Amazon EC2 inside my own VPC, and I'm trying to connect Dockerized services to an RDS database (which is in a different VPC). I computed the peering entries and the routing tables so that I could do this from minion machines:
ubuntu@minion1 :~$ psql -h <rds-instance-name> Password:
So everything works. The problem is that when I try to make this connection from inside a container managed by Kubernetes, I get a timeout:
ubuntu@pod-1234 :~$ psql -h <rds-instance-name> β¦
To connect the minion, I configured a peer-to-peer connection, configured routing tables from Kubernetes VPC so that 10.0.0.0/16 (CIDR for RDS VPC) matches the peer-to-peer connection and updated the protection of the RDS instance to allow traffic to port 5432 from the address range 172.20.0.0/16 (CIDR for VPC Kubernete).
source share