Is there a way to add node labels when deploying worker nodes in EKS. I do not see an option in the CF template available for worker nodes.
The only option I see right now is to use kubectl label command to add labels which is post cluster setup. However, the need to have complete automation which means applications are deployed automatically post cluster deployments and labels help in achieving the segregation.
With the new EKS-optimized AMIs(amazon-eks-node-vXX) and Cloudformation template refactors provided by AWS it is now possible to add node labels as simple as providing arguments to the BootstrapArguments
parameter of the [amazon-eks-nodegroup.yaml][1]
Cloudfomation template. For example --kubelet-extra-args --node-labels=my-key=my-value
. For more details check the AWS announcement: Improvements for Amazon EKS Worker Node Provisioning