英文:
Taint eks node-group
问题
我有一个包含2个节点组的集群:实时和通用。我只希望具有实时亲和性的Pod能够在实时集群的节点上运行。
我的方法是污点相关节点,并在我想要注册到该节点的Pod中添加容忍度。当我尝试给节点组设置污点时,我陷入了困境。在我的情况下,我有一个弹性的EKS节点组,即节点数量不断增加和减少。我该如何配置该组,以便在创建时对来自一个组的节点进行污点处理?
英文:
I have a cluster with 2 node groups: real time and general. I would like only pods which tolerate affinity real time to be able to run on nodes from the real time cluster.
My approach was to taint the relevant nodes and add toleration to the pod that I want to register to that node. I came into a dead-end when I was trying to taint a node-group. In my case I have an EKS node group that is elastic, i.e. nodes are increasing and decreasing in numbers constantly. How can I configure the group so that nodes from one group will be tainted upon creation?
答案1
得分: 7
我假设您是通过CloudFormation创建您的nodeGroup?
如果是这种情况,您可以将--kubelet-extra-args --register-with-taints={key}={value}:NoSchedule
添加为您的${BootstrapArguments},用于您的LaunchConfig
/etc/eks/bootstrap.sh ${clusterName} ${BootstrapArguments}
这样,每当您扩展或缩小您的集群时,将生成一个带有适当污点的Node。
英文:
I assume you're creating your nodeGroup via CloudFormation?
If that is the case you can add --kubelet-extra-args --register-with-taints={key}={value}:NoSchedule
as your ${BootstrapArguments} for your LaunchConfig
/etc/eks/bootstrap.sh ${clusterName} ${BootstrapArguments}
That way, whenever you scale up or down your cluster, a Node will be spawned with the appropriate taint.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论