Pod Labels Discipline

Labels drive selectors. The discipline.

Required labels

The required labels track the basic identity of every pod: the application, the instance, the version, the component. Without these, debugging a pod becomes guess-work; with them, every selector, every dashboard, and every audit query has a stable surface to query against.

Ownership labels

Ownership labels make the pod actionable during an incident. The on-call needs the team, the owner, and the contact channel in the alert payload; without them, the page becomes an investigation into who to call before the actual triage even begins.

Environment and lifecycle

Environment and lifecycle labels drive policy enforcement and capacity planning. Prod-versus-staging routing depends on the environment label; scheduler decisions and alert tier depend on the criticality label; capacity planning depends on the lifecycle label.

What not to put in labels

Labels are selectable indices, not free-form storage. High-cardinality values blow up metrics cost; free-form descriptions belong in annotations; secrets do not belong in labels at all because labels are visible to anyone with cluster read access.

Enforcement

Enforcement is what keeps label discipline real. OPA Gatekeeper or Kyverno policy at admission rejects non-compliant pods; CI lint catches missing labels at PR time; quarterly audit surfaces drift across the cluster.