I have my deployment, where I have defined postgres statefulSet, however I have it without PVC so if pod is dead - all data is gone. If I will list all pods I see below picture:
pod1 - Running - 10 min
pod2 - Running - 10 min
postgresPod - Running - 10 min
After some time I list pods again and see below:
pod1 - Running - 10 min
pod2 - Running - 10 min
postgresPod - Running - 5 min
As you can see postgresPod running 5 min. I "described" statefulset and see there below:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 5m **(x2 over 10m)** statefulset-controller create Pod postgresPod in StatefulSet x-postgres successful
Warning RecreatingFailedPod 5m statefulset-controller StatefulSet xx/x-postgres is recreating failed Pod postgresPod
Normal SuccessfulDelete 5m statefulset-controller **delete Pod postgresPod** in StatefulSet x-postgres successful
So my question is how I can know why statefulSet recreates the pods? Is there any additional log? Might be it is somehow related to resources of the machines, or pod was created on another node that has more resources on that specific moment?
Any Ideas?