By using AWS re:Post, you agree to the Terms of Use
/EKS Node selector - possible labels/

EKS Node selector - possible labels


A customer using EKS on AWS would like to isolate worker nodes on different racks. I can define labels manually as per: but I was wondering if automatic labels are perhaps available when K8s detects AWS rack-level placement groups.

My question ultimately is: are labels always user-defined or are there automated labels ? Is there any other strategy to create anti-affinity rules (e.g per-AZ nodes) ?

asked 6 months ago52 views
1 Answers
Accepted Answer

EKS is automatically adding labels to your nodes as you can see below. This information can be used for your node selectors and anti-affinity rules. That said, Placement Groups aren't automatically included as label on the node. You should define custom labels for identifying the nodes in you placement group and expose the topology for the node selectors. There is a blog post which shows you how to do this as well.

kubectl describe node ip-***-***-***-***.eu-west-1.compute.internal
Name:               ip-***-***-***-***.eu-west-1.compute.internal
Roles:              <none>
answered 6 months ago
reviewed 6 months ago
  • Thanks Vincent, exactly the information I needed, plus I hadn't spotted this blog post!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions