Skip to content

Commit 83cb37a

Browse files
authored
docs: Add additional notes around PDBs into the docs (#7858)
1 parent 6e92379 commit 83cb37a

File tree

7 files changed

+120
-8
lines changed

7 files changed

+120
-8
lines changed

website/content/en/docs/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,23 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
334334
335335
### Pod-Level Controls
336336
337-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
337+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
338+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
339+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
340+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
341+
342+
For example, consider a node with these pods and PDBs:
343+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
344+
- Pod B: Matches PDB-3 (minAvailable: 100%)
345+
- Pod C: No PDB
346+
347+
In this scenario, Karpenter cannot voluntary disrupt the node because:
348+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
349+
2. Pod B is blocked by PDB-3's requirement for 100% availability
350+
351+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
352+
353+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
338354
You can treat this annotation as a single-pod, permanently blocking PDB.
339355
This has the following consequences:
340356
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).

website/content/en/preview/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,23 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
334334
335335
### Pod-Level Controls
336336
337-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
337+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
338+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
339+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
340+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
341+
342+
For example, consider a node with these pods and PDBs:
343+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
344+
- Pod B: Matches PDB-3 (minAvailable: 100%)
345+
- Pod C: No PDB
346+
347+
In this scenario, Karpenter cannot voluntary disrupt the node because:
348+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
349+
2. Pod B is blocked by PDB-3's requirement for 100% availability
350+
351+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
352+
353+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
338354
You can treat this annotation as a single-pod, permanently blocking PDB.
339355
This has the following consequences:
340356
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).

website/content/en/v0.32/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,23 @@ To enable interruption handling, configure the `--interruption-queue` CLI argume
180180
181181
### Pod-Level Controls
182182
183-
You can block Karpenter from voluntarily choosing to disrupt certain pods by setting the `karpenter.sh/do-not-disrupt: "true"` annotation on the pod. This is useful for pods that you want to run from start to finish without disruption. By opting pods out of this disruption, you are telling Karpenter that it should not voluntarily remove a node containing this pod.
183+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
184+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
185+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
186+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
187+
188+
For example, consider a node with these pods and PDBs:
189+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
190+
- Pod B: Matches PDB-3 (minAvailable: 100%)
191+
- Pod C: No PDB
192+
193+
In this scenario, Karpenter cannot voluntary disrupt the node because:
194+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
195+
2. Pod B is blocked by PDB-3's requirement for 100% availability
196+
197+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
198+
199+
Secondly, you can block Karpenter from voluntarily choosing to disrupt certain pods by setting the `karpenter.sh/do-not-disrupt: "true"` annotation on the pod. This is useful for pods that you want to run from start to finish without disruption. By opting pods out of this disruption, you are telling Karpenter that it should not voluntarily remove a node containing this pod.
184200
185201
Examples of pods that you might want to opt-out of disruption include an interactive game that you don't want to interrupt or a long batch job (such as you might have with machine learning) that would need to start over if it were interrupted.
186202

website/content/en/v1.0/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,23 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
303303
304304
### Pod-Level Controls
305305
306-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
306+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
307+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
308+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
309+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
310+
311+
For example, consider a node with these pods and PDBs:
312+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
313+
- Pod B: Matches PDB-3 (minAvailable: 100%)
314+
- Pod C: No PDB
315+
316+
In this scenario, Karpenter cannot voluntary disrupt the node because:
317+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
318+
2. Pod B is blocked by PDB-3's requirement for 100% availability
319+
320+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
321+
322+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
307323
You can treat this annotation as a single-pod, permanently blocking PDB.
308324
This has the following consequences:
309325
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).

website/content/en/v1.1/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,23 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
303303
304304
### Pod-Level Controls
305305
306-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
306+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
307+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
308+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
309+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
310+
311+
For example, consider a node with these pods and PDBs:
312+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
313+
- Pod B: Matches PDB-3 (minAvailable: 100%)
314+
- Pod C: No PDB
315+
316+
In this scenario, Karpenter cannot voluntary disrupt the node because:
317+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
318+
2. Pod B is blocked by PDB-3's requirement for 100% availability
319+
320+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
321+
322+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
307323
You can treat this annotation as a single-pod, permanently blocking PDB.
308324
This has the following consequences:
309325
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).

website/content/en/v1.2/concepts/disruption.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,28 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
334334
335335
### Pod-Level Controls
336336
337-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
337+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
338+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
339+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
340+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
341+
342+
For example, consider a node with these pods and PDBs:
343+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
344+
- Pod B: Matches PDB-3 (minAvailable: 100%)
345+
- Pod C: No PDB
346+
347+
In this scenario, Karpenter cannot voluntary disrupt the node because:
348+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
349+
2. Pod B is blocked by PDB-3's requirement for 100% availability
350+
351+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
352+
353+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
338354
You can treat this annotation as a single-pod, permanently blocking PDB.
339355
This has the following consequences:
340356
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).
341357
- If the Node's owning NodeClaim has a [`terminationGracePeriod`]({{<ref "#terminationgraceperiod" >}}) configured, it will still be eligible for disruption via drift.
342-
- Like pods with a blocking PDB, pods with the `karpenter.sh/do-not-disrupt` annotation will **not** be gracefully evicted by the [Termination Controller]({{ref "#terminationcontroller"}}).
358+
- Like pods with a blocking PDB, pods with the `karpenter.sh/do-not-disrupt` annotation will **not** be gracefully evicted by the [Termination Controller]({{<ref "#terminationcontroller">}}).
343359
Karpenter will not be able to complete termination of the node until one of the following conditions is met:
344360
- All pods with the `karpenter.sh/do-not-disrupt` annotation are removed.
345361
- All pods with the `karpenter.sh/do-not-disrupt` annotation have entered a [terminal phase](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase) (`Succeeded` or `Failed`).

website/content/en/v1.3/concepts/disruption.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,23 @@ Duration and Schedule must be defined together. When omitted, the budget is alwa
334334
335335
### Pod-Level Controls
336336
337-
You can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
337+
Pods with blocking PDBs will not be evicted by the [Termination Controller]({{<ref "#termination-controller">}}) or be considered for voluntary disruption actions. When multiple pods on a node have different PDBs, none of the PDBs may be blocking for Karpenter to voluntary disrupt a node. This can create complex eviction scenarios:
338+
- If a pod matches multiple PDBs (via label selectors), ALL of these PDBs must allow for disruption
339+
- When different pods on the same node belong to different PDBs, ALL PDBs must simultaneously permit eviction
340+
- A single blocking PDB can prevent the entire node from being voluntary disrupted
341+
342+
For example, consider a node with these pods and PDBs:
343+
- Pod A: Matches PDB-1 (maxUnavailable: 0) and PDB-2 (maxUnavailable: 1)
344+
- Pod B: Matches PDB-3 (minAvailable: 100%)
345+
- Pod C: No PDB
346+
347+
In this scenario, Karpenter cannot voluntary disrupt the node because:
348+
1. Pod A is blocked by PDB-1 even though PDB-2 would allow disruption
349+
2. Pod B is blocked by PDB-3's requirement for 100% availability
350+
351+
As seen in this example, the more PDBs there are affecting a Node, the more difficult it will be for Karpenter to find an opportunity to perform voluntary disruption actions.
352+
353+
Secondly, you can block Karpenter from voluntarily disrupting and draining pods by adding the `karpenter.sh/do-not-disrupt: "true"` annotation to the pod.
338354
You can treat this annotation as a single-pod, permanently blocking PDB.
339355
This has the following consequences:
340356
- Nodes with `karpenter.sh/do-not-disrupt` pods will be excluded from [Consolidation]({{<ref "#consolidation" >}}), and conditionally excluded from [Drift]({{<ref "#drift" >}}).

0 commit comments

Comments
 (0)