本文介绍了EKS-节点标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在EKS中部署工作程序节点时,是否可以添加节点标签.我看不到CF模板中可用于工作程序节点的选项.

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.

EKS-CF-Workers

我现在看到的唯一选项是使用kubectl label命令添加标签,这是群集建立后的设置.但是,需要完全自动化,这意味着在群集部署后自动部署应用程序,并且标签有助于实现隔离.

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.

推荐答案

借助AWS提供的新的经EKS优化的AMI(amazon-eks-node-vXX)和Cloudformation模板重构,现在可以简单添加节点标签了为[amazon-eks-nodegroup.yaml][1] Cloudfomation模板的BootstrapArguments参数提供参数.例如--kubelet-extra-args --node-labels=my-key=my-value.有关更多详细信息,请查看AWS公告:对Amazon EKS Worker的改进节点配置

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

这篇关于EKS-节点标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-01 12:19