Skip to content

Commit db4a4a5

Browse files
committed
Updated the podAffinity concept documentation
1 parent 020646f commit db4a4a5

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

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

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ node, instead of the node labels.
239239

240240
#### Existing Pods' Affinity and Anti-Affinity Considerations
241241

242-
When scheduling a new Pod, the Kubernetes scheduler evaluates both the incoming Pod's affinity/anti-affinity rules and those of the existing Pods in the cluster. Here's how these rules are processed:
242+
When scheduling a new Pod, the Kubernetes scheduler evaluates the Pod's affinity/anti-affinity rules in the context of the current cluster state.
243243

244244
1. Hard Constraints (Node Filtering):
245245
- `podAffinity.requiredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
@@ -305,33 +305,15 @@ spec.
305305

306306
#### Existing Pods' Affinity and Anti-Affinity Considerations
307307

308-
When scheduling a new Pod, the Kubernetes scheduler evaluates both the incoming Pod's affinity/anti-affinity rules and those of existing Pods in the cluster. Here's how these rules are processed:
308+
When scheduling a new Pod, the Kubernetes scheduler evaluates the Pod's affinity/anti-affinity rules in the context of the current cluster state. Here's how these rules are processed:
309309

310310
1. Hard Constraints (Node Filtering):
311-
- Incoming Pod's `podAffinity` or `podAntiAffinity` with `requiredDuringSchedulingIgnoredDuringExecution`:
311+
- Incoming Pod's `podAffinity.requiredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
312312
The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
313-
- Existing Pods' `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
314-
Treated as hard constraints, filtering out nodes that violate existing Pods' required anti-affinity rules.
315-
- Incoming Pod's `podAffinity` or `podAntiAffinity` with `requiredDuringSchedulingIgnoredDuringExecution`:
316-
The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
317-
- Existing Pods' `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:**
318-
The scheduler treats these as hard constraints, filtering out nodes that violate existing Pods' required anti-affinity rules.
319313

320314
2. Soft Constraints (Node Scoring):
321315
- Incoming Pod's `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
322-
Scores nodes based on how well they meet these preferred affinity and anti-affinity rules to optimize Pod placement.
323-
- Existing Pods' `podAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
324-
Treated as soft constraints, scoring nodes based on how well they satisfy existing Pods' required affinity rules.
325-
- Incoming Pod's `podAffinity` or `podAntiAffinity` with `preferredDuringSchedulingIgnoredDuringExecution`:
326316
The scheduler scores nodes based on how well they meet these preferred affinity and anti-affinity rules to optimize Pod placement.
327-
- Existing Pods' `podAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
328-
The scheduler treats these as soft constraints, scoring nodes based on how well they satisfy existing Pods' required affinity rules.
329-
330-
3. Ignored Fields:
331-
- Existing Pods' `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
332-
Not considered during scheduling.
333-
- Existing Pods' `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
334-
- The scheduler does not consider these preferred affinity and anti-affinity rules during scheduling.
335317

336318
#### Scheduling a Group of Pods with Inter-pod Affinity to Themselves
337319

0 commit comments

Comments
 (0)