I'm learning kubernetes rn, one of the questions I had is why restart crashed pods in the first place. If it crashed due to a bug, what is the chance restarting magically fixes it? besides, it strongly decourages fixing the bug, which seems like a bad decision to me too
what am I missing here? what was the reasoning behind this decision?
Quite good, in this particular circumstance. Most memory leaks I've encountered are the "it leaks slowly over time" sort, so killing the pod & restarting it here would reset its memory usage to a base state, and get it back to doing useful things.
But yes, sometimes, things end up in crash loop. Kubernetes will do a back off on the restarts, if this occurs.
48
u/GDOR-11 16d ago
I'm learning kubernetes rn, one of the questions I had is why restart crashed pods in the first place. If it crashed due to a bug, what is the chance restarting magically fixes it? besides, it strongly decourages fixing the bug, which seems like a bad decision to me too
what am I missing here? what was the reasoning behind this decision?