Skip to content

support for service.spec.trafficDistribution #1850

Open
@nejec

Description

@nejec

Is your feature request related to a problem? Please describe.

I would like to use experimental feature of kubernetes 1.31 trafficDistribution, which uses routing the traffic to the nearest cluster node (e.g. in the same availability zone).

Describe the solution you'd like

To avoid cross availability zone traffic cost kubernetes offer several methods how to send traffic to service endpoint in the same availability zone (or node):

  • service.kubernetes.io/topology-mode: Auto with Topology Aware Routing, which has a drawback that it does not handle failover if the cluster node in the same zone goes down.
  • service.spec.trafficDistribution: PreferClose
  • Istio VirtualServer

Good explanation of the problem is available here.

Describe alternatives you've considered

For the time being using service.kubernetes.io/topology-mode: Auto can be used, however it has some drawbacks and it will be phased out in favour of trafficDistribution.

Using Istio for this specific cause adds another moving part, which is actually not needed since kubernetes already support the feature, however it is not implemented in the operator.

Additional context

I have looked into the code and since i am not a Golang programmer, i cannot make really good code for this. I can prepare something (but it will be mostly AI generated), however i don't expect for my code would be appropriate for such big project. But i can try ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions