TECHNOLOGY

Keep a disruption-budget selector inside one model fleet

In this article
THE QUICK TAKE

Inspect the admitted PDB selector: null and an empty object have opposite membership effects in the current policy API.

A maintenance request for one model is blocked by a disruption budget intended for another. The budget’s selector became empty during template rendering. In the current policy API, an empty selector can cover the whole namespace, so apparently unrelated workloads enter the same protection boundary.

Distinguish null from empty

The policy/v1 specification defines a null selector as matching no Pods and an empty object as selecting all Pods in the namespace. A templating tool that substitutes one for the other changes behavior substantially. Inspect the admitted API object, not only a source file containing an unresolved variable or a helper function’s intended default.

Enumerate the actual selection

Apply the effective selector to observed Pod labels and record the resulting names and owner identities. Compare this set with the intended model fleet. A generic label such as application role can legitimately match several models. A selector can be syntactically correct while still creating the wrong availability boundary.

Preserve controller assumptions

Percentage and maxUnavailable behavior depends on supported ownership and desired-scale rules. Do not combine arbitrary unrelated controllers and assume their counts form one coherent budget. Read status conditions and expectedPods rather than trusting a plausible healthy count. A broad selector can turn another workload’s failed replica into an unexpected maintenance dependency.

Correct scope before thresholds

Changing minAvailable to make eviction proceed can conceal the selection error. First define the intended stable labels and verify the exact set they select, then evaluate the appropriate threshold. Coordinate changes through the normal workload-management process; diagnostic discovery is not permission to delete a budget or force an eviction on a live service.

Test rendering boundaries

In a synthetic namespace with two distinguishable model fleets, test a populated selector, null and an empty object. Verify both selected membership and PDB status. Include a missing template input so a renderer cannot silently expand scope. Acceptance means the budget covers the declared fleet and unrelated model state cannot unexpectedly alter its decision. It does not make labels an authorization boundary or guarantee protection from every form of disruption.

Primary references

PodDisruptionBudget API.

Labels and Selectors.

Specifying a Disruption Budget.

Related reading: kubectl drain blocked by a PDB: what a disruption budget protects; GPUs in Kubernetes: scheduling CPU, RAM and accelerators together.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles