kubernetes / cloud-provider-aws

Cloud provider for AWS
https://cloud-provider-aws.sigs.k8s.io/
Apache License 2.0
382 stars 301 forks source link

Add network topology information to nodes #998

Open suket22 opened 1 month ago

suket22 commented 1 month ago

What would you like to be added:

I'd like information about the network topology of an instance to be added to the node. This information can be dynamically retrieved via the EC2 DescribeInstanceTopology API and be applied onto the node object similar to topology.k8s.aws/zone-id, whose mechanism was introduced in this PR.

Why is this needed: Information about an instance's topology is greatly beneficial when scheduling AI/ML workloads, where pods need to be in close proximity of one another.

Mapping the EC2 InstanceTopology to K8s labels might not be straightforward given it returns a list of network nodes, each sorted by the number of layers. We could probably choose something like -

topology.k8s.aws/network-node-1: nn1
topology.k8s.aws/network-node-2: nn2
topology.k8s.aws/network-node-3: nn3

/kind feature

cartermckinnon commented 3 weeks ago

/triage accepted