AWS EKS - Multi-cluster communication

5/4/2021

I have two EKS Clusters in a VPC.

  1. Cluster A running in Public subnet of VPC Frontend application is deployed here

  2. Cluster B running in Private subnet of VPC Backend application is deployed here

I would like to establish a networking with these two cluster such that, the pods from cluster A should be able to communicate with pods from Cluster B.

-- Santhoshkumar Ravichandran
amazon-eks
amazon-web-services
kubernetes
kubernetes-ingress

1 Answer

5/5/2021

At the high level, you will need to expose the backend application via a K8s service. You'd then expose this service via an ingress object (see here for the details and how to configure it). Front end pods will automatically be able to reach this service endpoint if you point them to it. It is likely that you will want to do the same thing to expose your front-end service (via an ingress).

Usually an architecture like this is deployed into a single cluster and in that case you'd only need one ingress for the front-end and the back-end would be reachable through standard in-cluster discovery of the back-end service. But because you are doing this across clusters you have to expose the back-end service via an ingress. The alternative would be to enable cross-clusters discovery using a mesh (see here for more details).

-- mreferre
Source: StackOverflow