4
votes

Currently services support multiple ports from a single selector, that maps onto pods of single type. This service/ports in turn can be exposed externally through 'type:LoadBalancer".

For a given subsystem like Spark - there are 3 pod types - master, worker, driver with each exposing a set of management ui ports that need to be accessed externally. Current service definition requires to create 3-LoadBalancers, one for each type - master, worker, driver).

These access ports are for low use management ui access. Is there anyway to combine all of these heterogeneous pod ports into a single "Service" with a corresponding "LoadBalancer". This is to avoid proliferation of LoadBalancers for external access of services

1

1 Answers

6
votes

Is there anyway to combine all of these heterogeneous pod ports into a single "Service" with a corresponding "LoadBalancer".

Services are intended to represent a homogeneous set of pods. Requests to the service are load balanced across the pods that back the service.

If you want to reduce the number of load balancers you should add a proxying layer above the subsystem services that can redirect incoming requests to the right subsystem. HAProxy or nginx should be pretty easy to configure to do this.