Some of my pods were recreated overnight and I cannot find out why
I scaled a workload up to twenty replicas. The next morning a handful of those pods had been recreated — deleted and made again, with creation timestamps hours after the rest.
The workload is healthy now, which is almost worse, because I have no idea what happened and no reason to believe it will not happen again.
Where does the reason for a pod being recreated actually get recorded, and how do I find it after the fact rather than while it is happening?
@sysadmin_selin · 6d ago
The distinction between restarted and recreated is worth pulling apart, because your description says the latter and it narrows the causes a lot.
A container that crashes is restarted in place: same pod, same name, restart count goes up. A pod that is recreated has a new name and a new creation timestamp, which means the old one was deleted. Common reasons:
Overnight, with a handful of pods and no deployment change, an autoscaler shrinking the node pool or a maintenance window replacing nodes is the leading suspect. Check the node names on the old and new pods: if they moved, the node is the story.
Reply
Report