✦ For everyone, free.

Practical knowledge for real and everyday life

Home

Kubernetes Scheduling Status Feedback

Kubernetes Scheduling Status Feedback offers real-time insights into pod scheduling outcomes, guiding operators on deployment success and resource allocation.

Kubernetes Scheduling Status Feedback is the set of signals — Pod conditions, events, and status fields — that Kubernetes surfaces back to operators and automation describing the outcome (or ongoing progress) of a Pod's scheduling attempt, forming the primary observable interface into an otherwise internal scheduler decision process. Because the scheduler does not expose a live, queryable API of its internal reasoning beyond these signals, correctly reading scheduling status feedback is the practical foundation of all scheduling-related troubleshooting, monitoring, and automation.

Feedback is delivered through several complementary channels, each suited to a different purpose: conditions for structured, machine-readable state; events for human-readable, timestamped narrative; and specific status fields for particular in-progress states like pending preemption.


The PodScheduled Condition

Structure and Meaning

Every Pod carries a PodScheduled condition within .status.conditions, with status: "True" once binding has succeeded, or status: "False" with a reason (commonly Unschedulable) while scheduling is still pending or has failed.

kubectl get pod codartium-app -o jsonpath='{.status.conditions[?(@.type=="PodScheduled")]}'

Using It in Automation

Because it is a structured condition rather than free-form text, PodScheduled is the field automation should poll or watch to determine scheduling status programmatically, rather than attempting to parse the more verbose, less stable text of scheduling events.


FailedScheduling Events

Aggregated Failure Summaries

Each unsuccessful scheduling attempt generates a FailedScheduling event on the Pod, with a message summarizing how many nodes were rejected and for what reasons, aggregated across the whole cluster rather than reported node by node in full detail.

kubectl describe pod codartium-app
Events:
  Type     Reason            Message
  ----     ------            -------
  Warning  FailedScheduling  0/12 nodes are available: 8 Insufficient cpu, 4 node(s) had taint {dedicated: gpu}, that the pod didn't tolerate.

Repeated Events and Deduplication

The Kubernetes event system deduplicates repeated identical events, incrementing a count field rather than creating a new event object each time — a Pod that has failed scheduling on the same grounds repeatedly for an extended period will show a single FailedScheduling event with a high count and an updated lastTimestamp, rather than a long list of near-identical entries.

kubectl get events --field-selector involvedObject.name=codartium-app -o json | jq '.items[].count'

Scheduled Events

Marking Successful Binding

A Scheduled event with a message identifying the target node marks successful binding, the counterpart to FailedScheduling for the success path.

Events:
  Type    Reason     Message
  ----    ------     -------
  Normal  Scheduled  Successfully assigned default/codartium-app to node-worker-04

nominatedNodeName for Preemption Feedback

Signaling an In-Progress Preemption

.status.nominatedNodeName is set when the scheduler has decided to preempt lower-priority Pods on a specific node to make room for this Pod, giving visibility into a preemption episode still in progress — the Pod is not yet bound there, but the scheduler has committed to that target and is waiting for the eviction of victim Pods to complete.

kubectl get pod codartium-urgent-app -o jsonpath='{.status.nominatedNodeName}'

Feedback for Cluster-Wide Scheduling Health

Scheduler Metrics as Aggregate Feedback

Beyond per-Pod signals, the scheduler exposes Prometheus-compatible metrics (scheduler_pending_pods, scheduler_schedule_attempts_total broken down by result) giving a cluster-wide view of scheduling health, useful for alerting on a general degradation in scheduling throughput rather than investigating individual Pods one at a time.

kubectl get --raw /metrics | grep scheduler_schedule_attempts_total

Building Alerting Around Scheduling Feedback

Alerting on Sustained Unschedulable State

A Pod remaining in PodScheduled: False for longer than an expected transient window is a natural alerting condition, distinguishing genuinely stuck Pods from the brief, normal delay every Pod experiences during its initial scheduling attempt.

kubectl get pods --field-selector=status.phase=Pending -o json | \
  jq -r '.items[] | select(.status.conditions[]?.type=="PodScheduled" and .status.conditions[]?.status=="False") | .metadata.name'

Example

apiVersion: v1
kind: Pod
metadata:
  name: codartium-feedback-example
spec:
  containers:
    - name: app
      image: codartium/app:latest
      resources:
        requests:
          cpu: "250m"
          memory: "256Mi"
kubectl get pod codartium-feedback-example -o jsonpath='{.status.conditions}'