Table of Contents

, ,

aws vpc peering

If you need to have 2 different vpc-s (from same or a different account) to be able communicate, you need to make sure that their subnets do not overlap otherwise the you will not be able to set up the route tables. General approach is to:

You shouldn't need any special DNS settings to resolve DNS A records in the other vpc, default settings should be ok when creating the peering connection:

The routes should be created in the appropriate route table of the subnets, because you may have a default main route table (“rtb-xxx…” below) and a custom route table (“eks-route-table” below) for which you associated the subnets, so you need to create the routes for the custom table

For k8s cluster vpc connections to test it, you can run a pod and try to ping/curl some resource you want to access in another vpc:

kubectl --kubeconfig=test-kubeconfig run test-pod --image=busybox --restart=Never --rm -it -- /bin/sh ping 10.10.10.15

The address 10.10.10.15 is some resource in the second VPC.

Tested on

See also

References