Skip to content

Kubernetes networking

0

If I create a Kubernetes cluster (EKS) running an application that needs to access an Amazon RDS instance, does the cluster need to be deployed within the same VPC as the RDS? If not, is setting up a VPC peering connection between the cluster's VPC and the RDS VPC required to ensure connectivity? Does Kubernetes offer another solution for me to access the RDS on another VPC ?

1 Answer
2
Accepted Answer

Hello.

You can connect RDS even if it is launched in a different VPC than EKS.
However, in order to connect, you need to be able to connect the VPC where RDS is running and the VPC where EKS is running using VPC peering or TransitGateway.
The following document uses EC2 as an example, but the same applies to EKS as well.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html#USER_VPC.Scenario3

If they are in the same VPC, you can connect if you allow connections from EKS in the RDS security group as described in the document below.
https://docs.aws.amazon.com/eks/latest/best-practices/sgpp.html

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.