Skip to content

Commit f39d397

Browse files
committed
fix: remove duplicate section and improve content organization in assign-pod-node.md
1 parent 9369f36 commit f39d397

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

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

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -237,24 +237,6 @@ Inter-pod affinity and anti-affinity allow you to constrain which nodes your
237237
Pods can be scheduled on based on the labels of Pods already running on that
238238
node, instead of the node labels.
239239

240-
#### Existing Pods' Affinity and Anti-Affinity Considerations
241-
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.
243-
244-
1. Hard Constraints (Node Filtering):
245-
- `podAffinity.requiredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
246-
- The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
247-
248-
2. Soft Constraints (Scoring):
249-
- `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
250-
- The scheduler scores nodes based on how well they meet these preferred affinity and anti-affinity rules to optimize Pod placement.
251-
252-
3. Ignored Fields:
253-
- Existing Pods' `podAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
254-
- These preferred affinity rules are not considered during the scheduling decision for new Pods.
255-
- Existing Pods' `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
256-
- Similarly, preferred anti-affinity rules of existing Pods are ignored during scheduling.
257-
258240
#### Types of Inter-pod Affinity and Anti-affinity
259241

260242
Inter-pod affinity and anti-affinity take the form "this
@@ -303,17 +285,23 @@ To use inter-pod affinity, use the `affinity.podAffinity` field in the Pod spec.
303285
For inter-pod anti-affinity, use the `affinity.podAntiAffinity` field in the Pod
304286
spec.
305287

306-
#### Existing Pods' Affinity and Anti-Affinity Considerations
288+
#### Scheduling Behavior
307289

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:
290+
When scheduling a new Pod, the Kubernetes scheduler evaluates the Pod's affinity/anti-affinity rules in the context of the current cluster state:
309291

310292
1. Hard Constraints (Node Filtering):
311-
- Incoming Pod's `podAffinity.requiredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
312-
The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
293+
- `podAffinity.requiredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution`:
294+
- The scheduler ensures the new Pod is assigned to nodes that satisfy these required affinity and anti-affinity rules based on existing Pods.
313295

314-
2. Soft Constraints (Node Scoring):
315-
- Incoming Pod's `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
316-
The scheduler scores nodes based on how well they meet these preferred affinity and anti-affinity rules to optimize Pod placement.
296+
2. Soft Constraints (Scoring):
297+
- `podAffinity.preferredDuringSchedulingIgnoredDuringExecution` and `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
298+
- The scheduler scores nodes based on how well they meet these preferred affinity and anti-affinity rules to optimize Pod placement.
299+
300+
3. Ignored Fields:
301+
- Existing Pods' `podAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
302+
- These preferred affinity rules are not considered during the scheduling decision for new Pods.
303+
- Existing Pods' `podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution`:
304+
- Similarly, preferred anti-affinity rules of existing Pods are ignored during scheduling.
317305

318306
#### Scheduling a Group of Pods with Inter-pod Affinity to Themselves
319307

0 commit comments

Comments
 (0)