污染 eks 节点组 [英] Taint eks node-group

查看:22
本文介绍了污染 eks 节点组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 2 个节点组的集群:实时常规.我只希望能够在 real time 集群中的节点上运行具有亲和力的 pod.real time.我的方法是污染相关节点并将容忍添加到我想注册到该节点的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?

推荐答案

我假设您正在通过 CloudFormation 创建您的 nodeGroup?

I assume you're creating your nodeGroup via CloudFormation?

如果是这种情况,您可以添加 --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}

这样,无论何时扩大或缩小集群,都会产生一个带有适当污点的节点.

That way, whenever you scale up or down your cluster, a Node will be spawned with the appropriate taint.

这篇关于污染 eks 节点组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆