Multiple deployments to a single service

My backend has 5 different deployments, each serving the request in a specific port.

Frontend service contacts the backend service with the necessary details. The backend service should be able to decide the required pod (from one of the 5 deployments) to serve the request.

Instead of creating 5 different services, is it possible to link a single service to multiple deployments?

Kubernetes version: 1.12
Cloud being used: Amazon EKS

PS: My requirement is different from https://github.com/kubernetes/kubernetes/issues/24875

Services use selectors and labels to target pods. If all your pods have the same label and the service targets that label; they will be included in that service.

With that said – you won’t be able to map specific ports to specific pods and it’s likely the application level routing will fail. A service will load-balance across all pods in the service and you won’t be able to do more granular routing.

You might want to take a look at some of the service mesh offerings like linkerd and istio that can do more granular control like that.

Very well described situations by @mrbobbytables , You need to do away with VM based EKS. For better management either you need to get those service mesh or you need to switch to native container based cloud which will provide deep granularity also your devops will be much simpler.

P.S - I was on AWS an year back and had shift away due to many advance issue in devops, including this one.