Skip to content

Commit 81d1bfe

Browse files
authored
Merge pull request #28517 from bergerhoffer/OSDOCS-1652-descheduler
OSDOCS-1652: Updates to descheduler docs for profiles and GA
2 parents 9522e33 + 0261583 commit 81d1bfe

11 files changed

+138
-300
lines changed

modules/nodes-descheduler-about.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ When the descheduler decides to evict pods from a node, it employs the following
2727
* Pods associated with daemon sets are never evicted.
2828
* Pods with local storage are never evicted.
2929
* Best effort pods are evicted before burstable and guaranteed pods.
30-
* All types of pods with the `descheduler.alpha.kubernetes.io/evict` annotation are evicted. This annotation is used to override checks that prevent eviction, and the user can select which pod is evicted. Users should know how and if the pod will be recreated.
30+
* All types of pods with the `descheduler.alpha.kubernetes.io/evict` annotation are eligible for eviction. This annotation is used to override checks that prevent eviction, and the user can select which pod is evicted. Users should know how and if the pod will be recreated.
3131
* Pods subject to pod disruption budget (PDB) are not evicted if descheduling violates its pod disruption budget (PDB). The pods are evicted by using eviction subresource to handle PDB.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * nodes/scheduling/nodes-descheduler.adoc
4+
5+
[id="nodes-descheduler-configuring-interval_{context}"]
6+
= Configuring the descheduler interval
7+
8+
You can configure the amount of time between descheduler runs. The default is 3600 seconds (one hour).
9+
10+
.Prerequisites
11+
12+
* Cluster administrator privileges
13+
14+
.Procedure
15+
16+
. Edit the `KubeDescheduler` object:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc edit kubedeschedulers.operator.openshift.io cluster -n openshift-kube-descheduler-operator
21+
----
22+
23+
. Update the `deschedulingIntervalSeconds` field to the desired value:
24+
+
25+
[source,yaml]
26+
----
27+
apiVersion: operator.openshift.io/v1beta1
28+
kind: KubeDescheduler
29+
metadata:
30+
name: cluster
31+
namespace: openshift-kube-descheduler-operator
32+
spec:
33+
deschedulingIntervalSeconds: 3600 <1>
34+
...
35+
----
36+
<1> Set the number of seconds between descheduler runs. A value of `0` in this field runs the descheduler once and exits.
37+
38+
. Save the file to apply the changes.

modules/nodes-descheduler-configuring-other-settings.adoc

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * nodes/scheduling/nodes-descheduler.adoc
4+
5+
[id="nodes-descheduler-configuring-profiles_{context}"]
6+
= Configuring descheduler profiles
7+
8+
You can configure which profiles the descheduler uses to evict pods.
9+
10+
.Prerequisites
11+
12+
* Cluster administrator privileges
13+
14+
.Procedure
15+
16+
. Edit the `KubeDescheduler` object:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc edit kubedeschedulers.operator.openshift.io cluster -n openshift-kube-descheduler-operator
21+
----
22+
23+
. Specify one or more profiles in the `spec.profiles` section.
24+
+
25+
[source,yaml]
26+
----
27+
apiVersion: operator.openshift.io/v1beta1
28+
kind: KubeDescheduler
29+
metadata:
30+
name: cluster
31+
namespace: openshift-kube-descheduler-operator
32+
spec:
33+
deschedulingIntervalSeconds: 3600
34+
logLevel: Normal
35+
managementState: Managed
36+
operatorLogLevel: Normal
37+
profiles:
38+
- AffinityAndTaints <1>
39+
- TopologyAndDuplicates <2>
40+
- LifecycleAndUtilization <3>
41+
----
42+
<1> Enable the `AffinityAndTaints` profile, which evicts pods that violate inter-pod anti-affinity, node affinity, and node taints.
43+
<2> Enable the `TopologyAndDuplicates` profile, which evicts pods in an effort to evenly spread similar pods, or pods of the same topology domain, among nodes.
44+
<3> Enable the `LifecycleAndUtilization` profile, which evicts long-running pods and balances resource usage between nodes.
45+
+
46+
You can enable multiple profiles; the order that the profiles are specified in is not important.
47+
48+
. Save the file to apply the changes.

modules/nodes-descheduler-configuring-strategies.adoc

Lines changed: 0 additions & 74 deletions
This file was deleted.

modules/nodes-descheduler-filtering-namespace.adoc

Lines changed: 0 additions & 60 deletions
This file was deleted.

modules/nodes-descheduler-filtering-priority.adoc

Lines changed: 0 additions & 54 deletions
This file was deleted.

modules/nodes-descheduler-installing.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[id="nodes-descheduler-installing_{context}"]
66
= Installing the descheduler
77

8-
The descheduler is not available by default. To enable the descheduler, you must install the Kube Descheduler Operator from OperatorHub. After the Kube Descheduler Operator is installed, you can then configure the eviction strategies.
8+
The descheduler is not available by default. To enable the descheduler, you must install the Kube Descheduler Operator from OperatorHub and enable one or more descheduler profiles.
99

1010
.Prerequisites
1111

@@ -30,4 +30,4 @@ The descheduler is not available by default. To enable the descheduler, you must
3030
.. Select the *Kube Descheduler* tab and click *Create KubeDescheduler*.
3131
.. Edit the settings as necessary and click *Create*.
3232

33-
You can now configure the strategies for the descheduler. There are no strategies enabled by default.
33+
You can now configure the profiles for the descheduler. If you did not adjust the profiles when creating the descheduler instance from the web console, the `AffinityAndTaints` profile is enabled by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * nodes/scheduling/nodes-descheduler.adoc
4+
5+
[id="nodes-descheduler-profiles_{context}"]
6+
= Descheduler profiles
7+
8+
The following descheduler profiles are available:
9+
10+
`AffinityAndTaints`:: This profile evicts pods that violate inter-pod anti-affinity, node affinity, and node taints.
11+
+
12+
It enables the following strategies:
13+
+
14+
* `RemovePodsViolatingInterPodAntiAffinity`: removes pods that are violating inter-pod anti-affinity.
15+
* `RemovePodsViolatingNodeAffinity`: removes pods that are violating node affinity.
16+
* `RemovePodsViolatingNodeTaints`: removes pods that are violating `NoSchedule` taints on nodes.
17+
+
18+
Pods with a node affinity type of `requiredDuringSchedulingIgnoredDuringExecution` are removed.
19+
20+
`TopologyAndDuplicates`:: This profile evicts pods in an effort to evenly spread similar pods, or pods of the same topology domain, among nodes.
21+
+
22+
It enables the following strategies:
23+
+
24+
* `RemovePodsViolatingTopologySpreadConstraint`: finds unbalanced topology domains and tries to evict pods from larger ones when `DoNotSchedule` constraints are violated.
25+
* `RemoveDuplicates`: ensures that there is only one pod associated with a replica set, replication controller, deployment, or job running on same node. If there are more, those duplicate pods are evicted for better pod distribution in a cluster.
26+
27+
`LifecycleAndUtilization`:: This profile evicts long-running pods and balances resource usage between nodes.
28+
+
29+
It enables the following strategies:
30+
+
31+
* `RemovePodsHavingTooManyRestarts`: removes pods that have been restarted too many times.
32+
+
33+
Pods that are restarted more than 100 times are removed. This includes restarts for Init Containers.
34+
35+
* `LowNodeUtilization`: finds nodes that are underutilized and evicts pods, if possible, from overutilized nodes in the hope that recreation of evicted pods will be scheduled on these underutilized nodes.
36+
+
37+
A node is considered underutilized if its usage is below 20% for all thresholds (CPU, memory, and number of pods).
38+
+
39+
A node is considered overutilized if its usage is above 50% for any of the thresholds (CPU, memory, and number of pods).
40+
41+
* `PodLifeTime`: evicts pods that are too old.
42+
+
43+
Pods that are older than 24 hours are removed.

0 commit comments

Comments
 (0)