Kubernete have no access from eks pod to rds mysql Kubernete have no access from eks pod to rds mysql kubernetes kubernetes

Kubernete have no access from eks pod to rds mysql


I did had the same scenario (RDS in the same VPC as the EKS cluster). What I did is as following:

  1. I've created a Cloudformation template with which I created my custom VPC, 8 subnetes(3 public, 3 private for EKS cluster and 2 private networks for RDS database), internet gateway, NAT Gateway, route tables and routes.

  2. Using eksctl with cluster configuration yaml I created the cluster and the node group. The node group joined my cluster.

  3. Using aws cli, I've created the db-subnet-group (containing the 2 private DB subnet) and I also started and RDS instance. Then I've set up some security group to allow traffic to DB just from the 3 private subnets)

As reference to create my custom cloudformation template I used the template created by eksctl when running the create command with the flag --node-private-networking.