-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Missing description in the podAffinity
concept documentation
#47922
Labels
kind/bug
Categorizes issue or PR as related to a bug.
language/en
Issues or PRs related to English language
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
sig/docs
Categorizes an issue or PR as relevant to SIG Docs.
sig/scheduling
Categorizes an issue or PR as relevant to SIG Scheduling.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
k8s-ci-robot
added
sig/scheduling
Categorizes an issue or PR as relevant to SIG Scheduling.
sig/docs
Categorizes an issue or PR as relevant to SIG Docs.
language/en
Issues or PRs related to English language
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Sep 14, 2024
/triage accepted |
k8s-ci-robot
added
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Sep 18, 2024
/assign |
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Sep 25, 2024
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Sep 25, 2024
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 3, 2024
…es#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 9, 2024
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 9, 2024
…es#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 10, 2024
…es#47922 Missing description in the podAffinity concept documentation kubernetes#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md Remove Star Remove Bug
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 10, 2024
…es#47922 Missing description in the podAffinity concept documentation kubernetes#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md Remove Star Remove Bug
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 14, 2024
…es#47922 Missing description in the podAffinity concept documentation kubernetes#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md Remove Star Remove Bug
aryasoni98
added a commit
to aryasoni98/website-kubernetes
that referenced
this issue
Oct 14, 2024
…es#47922 Missing description in the podAffinity concept documentation kubernetes#47922 update assign-pod-node.md update assign-pod-node.md Update assign-pod-node.md Remove Star Remove Bug
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
Categorizes issue or PR as related to a bug.
language/en
Issues or PRs related to English language
priority/important-longterm
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
sig/docs
Categorizes an issue or PR as relevant to SIG Docs.
sig/scheduling
Categorizes an issue or PR as relevant to SIG Scheduling.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
This is a Bug Report
Problem:
We noticed some information is missing in the concept documentation about how existing pods' podAffinity/podAntiAffinity fields affect the scheduling decision for each incoming pod. This makes it difficult to understand how the scheduler respects different affinity rules when making scheduling decisions.
In detail, there're two types of pod affinity rules, namely
podAffnity
andpodAntiAffinity
, and within each type, there arerequiredDuringSchedulingIgnoredDuringExecution
andpreferredDuringSchedulingIgnoredDuringExecution
. So, each pod has in total four fields for pod affinity rules:podAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAffinity.preferredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution
By reading the code we found that the scheduler also needs to consider such fields of existing pods in the cluster when making the decision for each incoming pod:
podAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAffinity.preferredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution
podAffinity.requiredDuringSchedulingIgnoredDuringExecution
podAffinity.preferredDuringSchedulingIgnoredDuringExecution
podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution
However, the documentation does not mention how the existing pods'
podAffinity
andpodAntiAffinity
affect the scheduling decision.Proposed Solution:
We suggest to add the following information to the concept documentation, and also the API specification:
podAffinity/podAntiAffinity
's required parts will also be considered when scheduling.podAntiAffinity
's required part will be considered as hard constraints, and nodes will be filtered out if not matching this.podAffinity
's required part will be considered as soft constraints, and nodes will be scored based this.podAffinity/podAntiAffinity
's preferred parts will not be considered when scheduling.Page to Update:
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
https://github.com/kubernetes/website/blob/main/content/en/docs/concepts/scheduling-eviction/assign-pod-node.md
/sig scheduling docs
/language en
The text was updated successfully, but these errors were encountered: