Kubernetes check
Deployment has only one desired replica
Trigger condition
A Deployment's desired replica count (spec.replicas) is exactly 1. An unset spec.replicas is resolved to Kubernetes' own default of 1; an explicit 0 is preserved and never flagged, and a count of 2 or more is out of scope. Evaluated at the Deployment, from spec.replicas alone -- never per Pod or container, and using the desired count at audit time, never actual ready-replica status.
Evidence
States the Deployment's name and its desired replica count (always 1 when this check fires).
Impact
This Deployment is configured to maintain one replica. If only one Pod is serving, losing it can interrupt availability until a replacement is ready. A single-replica Deployment can be an intentional choice (e.g. a workload that cannot safely run more than one instance), and the configured replica count alone does not establish that an outage has actually occurred.
Recommendation
If this workload can safely run more than one instance and availability matters, configure at least two replicas and let them spread across nodes (e.g. via a topology spread constraint or pod anti-affinity). For a manually scaled Deployment, make this change in its own source configuration. If a HorizontalPodAutoscaler manages this Deployment instead, review its own minReplicas setting rather than prescribing a fixed spec.replicas value here -- this check does not inspect HPA configuration, so whether one applies (and what it is already set to) must be confirmed separately.
Important limitations
This check evaluates only the desired replica count (spec.replicas). It never inspects actual ready/available replica status, Pod placement or spread, rollout strategy, HorizontalPodAutoscaler configuration, or PodDisruptionBudgets -- a Deployment targeting two or more replicas with only one currently ready is outside this check's scope.