You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying a multi-cluster EKS environment that shares services via the Multi-Cluster Services (MCS) API, multiple EndpointSlices may be created for a single Service. Currently, in “target-type: ip” mode, the AWS Load Balancer Controller only registers Pod IPs of locally running Pods. It does not register:
Pod IPs from other clusters exposed via the MCS API and listed in EndpointSlices; or
External IPs included in EndpointSlices whose TargetRef.Kind is not "Pod."
This behavior forces users to employ workarounds—such as using “target-type: instance” and routing traffic through NodePorts—which can introduce suboptimal routing and increase the risk of disruptions if a Node is scaled in or replaced.
Proposed Unified Solution
Enhance the AWS Load Balancer Controller to directly register IP addresses from EndpointSlices in “target-type: ip” mode, even if those addresses are intended for multi-cluster usage (MCS) or represent external endpoints. This can be done by:
Recognizing that an EndpointSlice may contain additional or external IP addresses (for instance, based on TargetRef.Kind != "Pod").
Incorporating these addresses into the Target Group, alongside the local cluster Pod IPs already handled.
A relevant part of the AWS Load Balancer Controller’s current design is located here:
Here, the logic could be extended to handle these alternative address types. For example, if the endpointslice.kubernetes.io/managed-by: endpointslice-controller.k8s.io label is missing, the Controller might treat the EndpointSlice’s IP addresses as external IPs; or if EndpointSlice.Endpoints[].TargetRef.Kind != "Pod", the Controller might interpret them as external endpoints.
In both cases, the goal remains the same: provide direct integration with new or external IP addresses listed in EndpointSlices, reducing complexity and offering more efficient traffic routing.
Alternatives Considered
Using “target-type: instance”
This solution leads to indirect routing (through NodePorts) and higher susceptibility to disruptions upon Node scale-in or replacement.
Example: MCS with Additional Cluster IPs
Below is a sample configuration demonstrating how MCS might export a Service, creating an EndpointSlice in one cluster with Pod IPs from another cluster:
With the proposed feature enabled, the IP “10.11.12.13” would be recognized by the AWS Load Balancer Controller and automatically registered in the Target Group.
The text was updated successfully, but these errors were encountered:
kahirokunn
changed the title
FeatureRequest: Support EndpointSlices Without In-cluster Pod Targets in Ingress
Feature Request: Support EndpointSlices Without In-cluster Pod Targets in Ingress
Jan 15, 2025
This solution leads to indirect routing (through NodePorts) and higher susceptibility to disruptions upon Node scale-in or replacement.
Later versions of Kubernetes and the controller have made using NodePorts for traffic a lot more reliable. For example, when using cluster autoscaler: #1688
Related Problem
When deploying a multi-cluster EKS environment that shares services via the Multi-Cluster Services (MCS) API, multiple EndpointSlices may be created for a single Service. Currently, in “target-type: ip” mode, the AWS Load Balancer Controller only registers Pod IPs of locally running Pods. It does not register:
This behavior forces users to employ workarounds—such as using “target-type: instance” and routing traffic through NodePorts—which can introduce suboptimal routing and increase the risk of disruptions if a Node is scaled in or replaced.
Proposed Unified Solution
Enhance the AWS Load Balancer Controller to directly register IP addresses from EndpointSlices in “target-type: ip” mode, even if those addresses are intended for multi-cluster usage (MCS) or represent external endpoints. This can be done by:
A relevant part of the AWS Load Balancer Controller’s current design is located here:
aws-load-balancer-controller/pkg/backend/endpoint_resolver.go
Lines 155 to 157 in c701a42
Here, the logic could be extended to handle these alternative address types. For example, if the
endpointslice.kubernetes.io/managed-by: endpointslice-controller.k8s.io
label is missing, the Controller might treat the EndpointSlice’s IP addresses as external IPs; or ifEndpointSlice.Endpoints[].TargetRef.Kind != "Pod"
, the Controller might interpret them as external endpoints.In both cases, the goal remains the same: provide direct integration with new or external IP addresses listed in EndpointSlices, reducing complexity and offering more efficient traffic routing.
Alternatives Considered
Using “target-type: instance”
Example: MCS with Additional Cluster IPs
Below is a sample configuration demonstrating how MCS might export a Service, creating an EndpointSlice in one cluster with Pod IPs from another cluster:
With the proposed feature enabled, the IP “10.11.12.13” would be recognized by the AWS Load Balancer Controller and automatically registered in the Target Group.
References
The text was updated successfully, but these errors were encountered: