Search code examples
kubernetesamazon-ekseksctl

How to communicate between Backend (microservices) in AWS EKS?


I have 2 node js backend applications, they depend on each other, but I'm confused about how these 2 backends communicate in Kubernetes AWS EKS


Solution

  • In a default k8s setting, creating a service and registering pods into it will create an internal dns address each pod can use to reach another one.

    So, if your services are named service-a and service-b, service-a can reach service-b by sending requests to the service-a host. The FQDN for each service is service-<x>.<namespace>.svc.cluster.local

    More information can be found here