Skip to content

Commit b55e8bc

Browse files
authored
Merge pull request #39196 from atiratree/pdbs-arbitrary-controllers
PDBs: mention scale subresource in Arbitrary Controllers and Selectors
2 parents 5e6d914 + 3817366 commit b55e8bc

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

content/en/docs/tasks/run-application/configure-pdb.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ is enabled.
5656

5757
You can also use PDBs with pods which are not controlled by one of the above
5858
controllers, or arbitrary groups of pods, but there are some restrictions,
59-
described in [Arbitrary Controllers and Selectors](#arbitrary-controllers-and-selectors).
59+
described in [Arbitrary workloads and arbitrary selectors](#arbitrary-controllers-and-selectors).
6060

6161
## Think about how your application reacts to disruptions
6262

@@ -283,19 +283,24 @@ Policies:
283283
Pods in `Pending`, `Succeeded` or `Failed` phase are always considered for eviction.
284284
{{< /note >}}
285285

286-
## Arbitrary Controllers and Selectors
286+
## Arbitrary workloads and arbitrary selectors {#arbitrary-controllers-and-selectors}
287287

288288
You can skip this section if you only use PDBs with the built-in
289-
application controllers (Deployment, ReplicationController, ReplicaSet, and StatefulSet),
290-
with the PDB selector matching the controller's selector.
289+
workload resources (Deployment, ReplicaSet, StatefulSet and ReplicationController)
290+
or with {{< glossary_tooltip term_id="CustomResourceDefinition" text="custom resources" >}}
291+
that implement a `scale` [subresource](/docs/concepts/extend-kubernetes/api-extension/custom-resources/#advanced-features-and-flexibility),
292+
and where the PDB selector exactly matches the selector of the Pod's owning resource.
291293

292-
You can use a PDB with pods controlled by another type of controller, by an
294+
You can use a PDB with pods controlled by another resource, by an
293295
"operator", or bare pods, but with these restrictions:
294296

295297
- only `.spec.minAvailable` can be used, not `.spec.maxUnavailable`.
296298
- only an integer value can be used with `.spec.minAvailable`, not a percentage.
297299

298-
You can use a selector which selects a subset or superset of the pods belonging to a built-in
299-
controller. The eviction API will disallow eviction of any pod covered by multiple PDBs,
300+
It is not possible to use other availability configurations,
301+
because Kubernetes cannot derive a total number of pods without a supported owning resource.
302+
303+
You can use a selector which selects a subset or superset of the pods belonging to a
304+
workload resource. The eviction API will disallow eviction of any pod covered by multiple PDBs,
300305
so most users will want to avoid overlapping selectors. One reasonable use of overlapping
301306
PDBs is when pods are being transitioned from one PDB to another.

0 commit comments

Comments
 (0)