Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like to have a strategy: Karmada will prioritize pods to cluster A when scheduling pods, and will only schedule pods to cluster B when cluster A is insufficient (pending), how can this process be automated? #5997

Open
Schwarao opened this issue Dec 30, 2024 · 9 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@Schwarao
Copy link

I would like to have a strategy: Karmada will prioritize pods to cluster A when scheduling pods, and will only schedule pods to cluster B when cluster A is insufficient (pending), how can this process be automated?

@Schwarao Schwarao added the kind/question Indicates an issue that is a support question. label Dec 30, 2024
@chaosi-zju
Copy link
Member

Is your requirement like this? https://github.com/karmada-io/karmada/pull/5512/files

We are working on best practices for this issue, if you also have this request, then great, we can invite you to discuss it together~

@RainbowMango
Copy link
Member

Hi @Schwarao I think the affinity groups might help.

@Schwarao
Copy link
Author

您的要求是这样的吗?https://github.com/karmada-io/karmada/pull/5512/files

我们正在针对这个问题制定最佳实践,如果你也有这个要求,那就太好了,我们可以邀请你一起讨论~

yes,This is indeed the requirement, but I only need to complete the pod resource type here

@chaosi-zju
Copy link
Member

Pod resources are much simpler. You can try the existing solution(affinity groups) first.

If there is anything you don't satisfy with this solution, please give feedback in time.

@Schwarao
Copy link
Author

But it seems that it shouldn't work:
This is the policy I use:
image

After creating a file here, it is still scheduled and in pending:
image

Pod resources are much simpler. You can try the existing solution(affinity groups) first.

If there is anything you don't satisfy with this solution, please give feedback in time.

@Schwarao
Copy link
Author

@chaosi-zju
I see, I want to add this step field:
replicaScheduling:
replicaSchedulingType: Divided
replicaDivisionPreference: Aggregated

#4694
Does the content in the following document need to be added to the specification?
image

@chaosi-zju
Copy link
Member

Is it the content of the Multiple cluster affinity groups?

yes

After creating a file here, it is still scheduled and in pending:

maybe you didn't specify replicaScheduling or your replicaScheduling is StaticWeight strategy, then it will still scheduled to first group

Does the content in the following document need to be added to the specification?

sorry, I didn't get your mean? do you mean you want to improve our website doc to prevent users from missing this information?

@Schwarao
Copy link
Author

是 Multiple cluster affinity groups (多集群关联组) 的内容吗?

是的

在此处创建文件后,它仍处于 scheduled 状态且处于待处理状态:

也许您没有指定或您的 IS 策略,那么它仍将安排到 First GroupreplicaScheduling``replicaScheduling``StaticWeight

以下文档中的内容是否需要添加到规范中?

对不起,我不明白你的意思?您的意思是要改进我们的网站文档以防止用户错过这些信息吗?

Yes, there is no mention in the content of Multiple cluster affinity groups in the documentation that you need to specify replicaScheduling replicaScheduling StaticWeight, you see if you need to optimize
meantime,I have deployed multiple PropagationPolicies and now I want to create pods, how do I specify which PropagationPolicy to use in yaml

@chaosi-zju
Copy link
Member

Yes, there is no mention in the content of Multiple cluster affinity groups in the documentation that you need to specify replicaScheduling replicaScheduling StaticWeight, you see if you need to optimize

Of course, I really need it. Thank you so much for your help!

I have deployed multiple PropagationPolicies and now I want to create pods, how do I specify which PropagationPolicy to use in yaml

When matching policies, the resource template selects the highest priority policy. You can manually set policy priorities; if none are declared, the implicit priority is based on the accuracy of the resourceSelector. (see explicit and implicit priority)

another method is group pods by labels and use labelSelector in policy to select resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

3 participants