PodDisruptionBudget [page]deterministic
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
`apiVersion: policy/v1`
`import "k8s.io/api/policy/v1"`
## PodDisruptionBudget {#PodDisruptionBudget}
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
<hr>
<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</td> </tr> <tr> <td><code>spec</code><br/><em><a href="">PodDisruptionBudgetSpec</a></em></td> <td>Specification of the desired behavior of the PodDisruptionBudget.</td> </tr> <tr> <td><code>status</code><br/><em><a href="">PodDisruptionBudgetStatus</a></em></td> <td>Most recently observed status of the PodDisruptionBudget.</td> </tr> </tbody> </table>
## PodDisruptionBudgetSpec {#PodDisruptionBudgetSpec}
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
<hr>
<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>maxUnavailable</code><br/><em></em></td> <td>An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable".</td> </tr> <tr> <td><code>minAvailable</code><br/><em></em></td> <td>An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%".</td> </tr> <tr> <td><code>selector</code><br/><em><a href="">LabelSelector</a></em><br/><em>patch strategy: replace</em></td> <td>Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.</td> </tr> <tr> <td><code>unhealthyPodEvictionPolicy</code><br/><em>string</em></td> <td>UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type="Ready",status="True". Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy. IfHealthyBudget policy means that running pods (status.phase="Running"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction. AlwaysAllow policy means that all running pods (status.phase="Running"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy …(trimmed)