更新时间:2024-07-31 GMT+08:00

节点优选策略

优选节点的常用算法,通过模拟分配从各个维度为节点打分,找到最适合当前作业的节点。

打分参数:

  • nodeaffinity.weight:节点亲和性优先调度,默认值是1。
  • podaffinity.weight:Pod亲和性优先调度,默认值是1。
  • leastrequested.weight:资源分配最少的节点优先,默认值是1。
  • balancedresource.weight:节点上面的不同资源分配平衡的优先,默认值是1。
  • mostrequested.weight:资源分配最多的节点优先,默认值是0。
  • tainttoleration.weight:污点容忍高的优先调度,默认值是1。
  • imagelocality.weight:节点上面有Pod需要镜像的优先调度,默认值是1。
  • selectorspread.weight:把Pod均匀调度到不同的节点上,默认值是0。
  • volumebinding.weight:Local PV延迟绑定调度,默认值是1。
  • podtopologyspread.weight:Pod拓扑调度,默认值是2。

取值范围

开启和关闭插件:true/false

打分参数:

  • nodeaffinity.weight:非负整数。
  • podaffinity.weight:非负整数。
  • leastrequested.weight:非负整数。
  • balancedresource.weight:非负整数。
  • mostrequested.weight:非负整数。
  • tainttoleration.weight:非负整数。
  • imagelocality.weight:非负整数。
  • selectorspread.weight:非负整数。
  • volumebinding.weight:非负整数。
  • podtopologyspread.weight:非负整数。

默认值

开启插件:true

  • nodeaffinity.weight:1。
  • podaffinity.weight:1。
  • leastrequested.weight:1。
  • balancedresource.weight:1。
  • mostrequested.weight:0。
  • tainttoleration.weight:1。
  • imagelocality.weight:1。
  • selectorspread.weight:0。
  • volumebinding.weight:1。
  • podtopologyspread.weight:2。

是否允许修改

允许

作用范围

CCE Standard/CCE Turbo

配置建议

建议使用默认配置,如果业务有特殊的述求,可以根据业务实际场景调整各权重值。

增大策略对应的权重值,可以使该策略在节点打分时发挥更大的影响力。

NodeOrder和Binpack对某个节点的给出的基础分值,并根据对应的权重值进行倍数放大,调整插件中某个策略的权重值后,该策略对于节点打分的整体影响力增加,其他插件对节点评分的影响力将会同步被削弱。