污染 eks 节点组

huangapple go评论67阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年1月6日 18:12:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/59610191.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定