derailed/k9s · warning
desiring %d replicas but %d ready
Error message
desiring %d replicas but %d ready
What it means
DaemonSet.diagnose compares status.desiredNumberScheduled with status.numberReady; a mismatch yields 'desiring N replicas but M ready'. It is the health indicator for DaemonSet rows: nodes where the daemon pod is not (yet) ready.
Source
Thrown at internal/render/ds.go:89
ds.Name,
computeVulScore(ds.Namespace, ds.Labels, &ds.Spec.Template.Spec),
strconv.Itoa(int(ds.Status.DesiredNumberScheduled)),
strconv.Itoa(int(ds.Status.CurrentNumberScheduled)),
strconv.Itoa(int(ds.Status.NumberReady)),
strconv.Itoa(int(ds.Status.UpdatedNumberScheduled)),
strconv.Itoa(int(ds.Status.NumberAvailable)),
mapToStr(ds.Labels),
AsStatus(d.diagnose(ds.Status.DesiredNumberScheduled, ds.Status.NumberReady)),
ToAge(ds.GetCreationTimestamp()),
}
return nil
}
// Happy returns true if resource is happy, false otherwise.
func (DaemonSet) diagnose(d, r int32) error {
if d != r {
return fmt.Errorf("desiring %d replicas but %d ready", d, r)
}
return nil
}
View on GitHub (pinned to 2d3ccc6ba2)
Solutions
- Wait if a rollout is in flight: kubectl rollout status ds/<name>
- Find not-ready pods: kubectl get pods -l <selector> -o wide | grep -v Running/Ready, then describe the failing ones
- Add missing tolerations/affinity for tainted nodes, or fix resources
- Check kubelet/containerd on nodes whose daemon pods stay pending
Example fix
# before: daemon pods not scheduled on control-plane # tolerations missing # after tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists effect: NoSchedule
Defensive patterns
Strategy: fallback
Validate before calling
if ds.Status.DesiredNumberScheduled == ds.Status.NumberReady {
status = "ok" // skip diagnose
} Try / catch
Use the error as row status; when desired-ready persists across refreshes, escalate to per-node pod inspection.
Prevention
- Add tolerations for all node roles your daemon must run on
- Pre-pull daemon images or use registry mirrors on large fleets
- Alert on per-node daemon gaps rather than aggregate mismatch alone
When it happens
Trigger: Daemon rollout in progress on a large fleet; pods unschedulable on some nodes (taints, resources); CNI/node-exporter daemons crashing on specific kernels; newly joined nodes still pulling images.
Common situations: Upgrading kube-proxy/node-exporter DaemonSets; nodes with incompatible taints missing tolerations; slow registries delaying image pulls; disk pressure evicting daemon pods.
Related errors
- desiring %d replicas got %d available
- expecting DaemonSet resource
- expecting StatefulSet resource
- resource is not restartable
- user is not authorized to restart %q
AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15).
Data as JSON: /api/errors/1788ff839994118d.
Report an issue: GitHub.