Skip to content

Commit ca57565

Browse files
authored
Merge pull request #42920 from sftim/20230622_add_pod_affinity_text
Add pod affinity note
2 parents fe22087 + b4652d7 commit ca57565

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

content/en/docs/concepts/scheduling-eviction/assign-pod-node.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,15 @@ To use inter-pod affinity, use the `affinity.podAffinity` field in the Pod spec.
283283
For inter-pod anti-affinity, use the `affinity.podAntiAffinity` field in the Pod
284284
spec.
285285

286+
#### Scheduling a group of pods with inter-pod affinity to themselves
287+
288+
If the current Pod being scheduled is the first in a series that have affinity to themselves,
289+
it is allowed to be scheduled if it passes all other affinity checks. This is determined by
290+
verifying that no other pod in the cluster matches the namespace and selector of this pod,
291+
that the pod matches its own terms, and the chosen node matches all requested topologies.
292+
This ensures that there will not be a deadlock even if all the pods have inter-pod affinity
293+
specified.
294+
286295
#### Pod affinity example {#an-example-of-a-pod-that-uses-pod-affinity}
287296

288297
Consider the following Pod spec:

0 commit comments

Comments
 (0)