
<!-- Generated from disruption/manifests/machinedisruptionbudgets-crd.yaml by crdref. Do not edit. -->

# `MachineDisruptionBudget`

A `MachineDisruptionBudget` limits how many of the machines it
selects can be out of service at the same time. The budget named
`default` covers the whole fleet. Add a budget with a selector to
give a group of machines a stricter limit. `kubectl get mdb` lists
each budget and how many more machines it allows out now. [How
`liken` works](/docs/concepts/how-liken-works/#the-reboot-turn)
explains how the budgets decide each reboot turn, and
[`Disruption`](/docs/reference/disruption/) describes the requests
that wait for them.

A MachineDisruptionBudget limits how many of the machines it selects may be out of service at the same time, planned and unplanned together. A machine takes a reboot turn only when every budget that selects it has room. The budget named default selects every machine, and cluster-operator creates it with a limit of one machine when it is missing. Whatever the budgets allow, only one leader is out of service at a time.

## spec

The machines the budget covers, and the limit.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="spec--selector"></span>`selector` | [object](#specselector) | no | Selects machines by the labels on their Machine objects, with the grammar of a Kubernetes label selector. An empty selector selects every machine. |
| <span id="spec--maxunavailable"></span>`maxUnavailable` | integer | yes | How many of the selected machines can be out of service at the same time. A machine counts when it holds a reboot turn, or when it is Lost, Degraded, or otherwise unavailable without one. |

### spec.selector

Selects machines by the labels on their Machine objects, with the grammar of a Kubernetes label selector. An empty selector selects every machine.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="specselector--matchlabels"></span>`matchLabels` | map[string]string | no | Each label a selected machine carries, with its value. |
| <span id="specselector--matchexpressions"></span>`matchExpressions` | [\[\]object](#specselectormatchexpressions) | no | Each expression a selected machine's labels meet. |

#### spec.selector.matchExpressions[]

Each expression a selected machine's labels meet.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="specselectormatchexpressions--key"></span>`key` | string | yes |  |
| <span id="specselectormatchexpressions--operator"></span>`operator` | string | yes | One of: `In`, `NotIn`, `Exists`, `DoesNotExist`. |
| <span id="specselectormatchexpressions--values"></span>`values` | []string | no |  |

## status

What the budget counted on cluster-operator's last sweep.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="status--observedgeneration"></span>`observedGeneration` | integer | no |  |
| <span id="status--selected"></span>`selected` | integer | no | How many machines the selector selects. |
| <span id="status--unavailable"></span>`unavailable` | integer | no | How many of the selected machines are out of service. |
| <span id="status--allowed"></span>`allowed` | integer | no | How many more of the selected machines may go out of service now. |
| <span id="status--conditions"></span>`conditions` | [\[\]object](#statusconditions) | no | DisruptionAllowed is True while the budget has room for one more machine, and its message names the machines that fill it. |

### status.conditions[]

DisruptionAllowed is True while the budget has room for one more machine, and its message names the machines that fill it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="statusconditions--type"></span>`type` | string | yes |  |
| <span id="statusconditions--status"></span>`status` | string | yes | One of: `True`, `False`, `Unknown`. |
| <span id="statusconditions--observedgeneration"></span>`observedGeneration` | integer | no |  |
| <span id="statusconditions--lasttransitiontime"></span>`lastTransitionTime` | string | yes |  |
| <span id="statusconditions--reason"></span>`reason` | string | yes |  |
| <span id="statusconditions--message"></span>`message` | string | no |  |

