Taint eks node-group

独自空忆成欢 提交于 2021-02-18 17:51:40

问题


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:


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.



来源:https://stackoverflow.com/questions/59610191/taint-eks-node-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!