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?