Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

kubernetes - 优先选择某些节点直到满(Prefer certain nodes until full)

I've got an AKS cluster configured with two fairly small VM worker nodes, and then a virtual node to use ACI.

(我有一个配置有两个相当小的VM工作程序节点的AKS集群,然后是一个使用ACI的虚拟节点。)

What I really want to happen is for pods to get scheduled on the two VM nodes until they are full, then use the virtual node, but I cannot get this to work.

(我真正想做的是让Pod在两个VM节点上进行调度,直到它们装满,然后使用虚拟节点,但是我无法使它工作。)

I've tried using node affinity, as suggested here , but this just doesn't work, pods get scheduled on the virtual node first.

(我已经使用节点亲和力试过了,建议在这里 ,但是这是行不通的,豆荚先被安排在虚拟节点上。)

If I use a required node affinity, then they do get scheduled only on the VM nodes, but that is not what I want.

(如果我使用必需的节点关联性,那么它们只会在VM节点上进行调度,但这不是我想要的。)

I am guessing the issue here is that the resource availability on my VM nodes is significantly lower than the virtual node (as you would expect) so the virtual node is getting much more weight applied to it, which counteracts the affinity rule, but I don't really know as I can't see any way to see this weight.

(我猜这里的问题是我的VM节点上的资源可用性大大低于虚拟节点(如您所料),因此虚拟节点的权重大大提高,这抵消了相似性规则,但是我不知道我真的不知道,因为我看不到任何方式可以看到这个重量。)

So, does anyone have a way to make this scenario work?

(那么,有没有人有办法使这种情况可行?)

  ask by Sam Cogan translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/ goes over the different scoring options used by the scheduler and https://github.com/kubernetes/examples/blob/master/staging/scheduler-policy/scheduler-policy-config.json shows how to customize them.

(https://kubernetes.io/docs/concepts/scheduling/kube-scheduler/讨论了调度程序和https://github.com/kubernetes/examples/blob/master/staging/scheduler-policy使用的不同计分选项/scheduler-policy-config.json显示了如何自定义它们。)

I suspect what you want is a preferred affinity combined with increasing the scoring factor for NodeAffinityPriority .

(我怀疑您想要的是preferred亲和力,同时增加NodeAffinityPriority的得分因子。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...