Score:0

Direct Traffic from a Pulbic ALB to an Internal ALB for EKS

au flag

So I have an EKS cluster sitting in a dedicated VPC (EKS-VPC) In my Main VPC I have a public-facing ALB that I want it to somehow direct traffic to services running in EKS. More specifically I want the ALB to forward requests for specific endpoints to EKS and all the other ones to an EC2 instance in my Main VPC.

So for example requests to myservice.mydomain.com will go to an EC2 instance inside the Main VPC but requests to myservice.mydomain.com/myapi/myendpoint will go to a service running in the EKS - so a different VPC

I have VPC peering enabled between the main VPC and the EKS VPC and I have updated my route tables.

I have of course configured an Ingress and setup the ALB controller inside the EKS, which is taking care of the internal ALB configuration

I was thinking of creating an internal ALB for the EKS cluster. Then get its IPs and create a new IP Target Group that would associate it with the Main ALB. However, as you can imagine this fails as the Health checks to the internal ALBs private IPs fail. So I was wondering what is the best option for this situation?

Score:0
au flag

Nevermind, I got it working by adding a listener to the internal ALB that responded a fixed code (200) to the health checks coming from the main ALB

argyrodagdileli avatar
au flag
Also for anyone looking into implementing the same solution, even the private IPs of the ALB are not static. So it's best to incorporate an NLB too
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.