Taint eks节点组 [英] Taint eks node-group
问题描述
我有一个包含2个节点组的集群:实时和一般.我只希望能够容忍 realtime 的Pod能够在 realtime 集群中的节点上运行.
我的方法是
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?
推荐答案
我假设您正在通过CloudFormation创建nodeGroup?
I assume you're creating your nodeGroup via CloudFormation?
在这种情况下,可以为LaunchConfig添加--kubelet-extra-args --register-with-taints={key}={value}:NoSchedule
作为$ {BootstrapArguments}
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}
这样,每当您向上或向下扩展群集时,都会生成带有适当污点的Node.
That way, whenever you scale up or down your cluster, a Node will be spawned with the appropriate taint.
这篇关于Taint eks节点组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!