One pod sits Pending for hours while identical pods from the same deployment schedule fine
Six node pool, all the same instance type at 4 vCPU. Deployment has ten replicas, nine are Running and one has been Pending since last night. Events say 0/6 nodes are available with a string of reasons I have read twenty times. There is a topology spread constraint and a nodeSelector on the pod spec, both inherited from a template I did not write. Cluster autoscaler is on and has not added a node.
@crashloop_cara · 3mo ago · 3 replies
Read the event string literally, phrase by phrase, because each clause is a different predicate failing on a different subset of nodes and they add up to six.
Insufficient cpu or memory means the requests do not fit in what is left. node(s) had untolerated taint means a taint. node(s) didn't match Pod's node affinity/selector means your nodeSelector. didn't match pod topology spread constraints means the skew rule. node(s) had volume node affinity conflict means the PV is pinned to a zone.
The sum across clauses will equal your node count. If two clauses account for five nodes and one for the last, you have two separate problems, which is why nine scheduled and one did not.
Reply
Report
@first_dollar_fi · 3mo ago
kubectl get events --field-selector involvedObject.name=POD sorted by timestamp is worth it too, because the scheduler updates the message as conditions change and the current one may not be the original reason.
Reply
Report
@trace_tilly · 3mo ago
Adding them up was the trick. Five nodes fail the spread constraint and one fails on cpu. Two problems wearing one trench coat.
Reply
Report