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
explains how the budgets decide each reboot turn, and
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 |
|---|---|---|---|
selector |
object | no | Selects machines by the labels on their Machine objects, with the grammar of a Kubernetes label selector. An empty selector selects every machine. |
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 |
|---|---|---|---|
matchLabels |
map[string]string | no | Each label a selected machine carries, with its value. |
matchExpressions |
[]object | no | Each expression a selected machine’s labels meet. |
spec.selector.matchExpressions[]
Each expression a selected machine’s labels meet.
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | yes | |
operator |
string | yes | One of: In, NotIn, Exists, DoesNotExist. |
values |
[]string | no |
status
What the budget counted on cluster-operator’s last sweep.
| Field | Type | Required | Description |
|---|---|---|---|
observedGeneration |
integer | no | |
selected |
integer | no | How many machines the selector selects. |
unavailable |
integer | no | How many of the selected machines are out of service. |
allowed |
integer | no | How many more of the selected machines may go out of service now. |
conditions |
[]object | 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 |
|---|---|---|---|
type |
string | yes | |
status |
string | yes | One of: True, False, Unknown. |
observedGeneration |
integer | no | |
lastTransitionTime |
string | yes | |
reason |
string | yes | |
message |
string | no |