问题原文
原帖链接 · Nikhil · CC BY-SA 4.0
In have scaled my Pods to 20 in my cluster and when I see the next day the few of the scaled Pods were recreated.
When I say Pod recreated, it is getting deleted and created freshly and the timestamp of the recreated Pod and the scaled Pods vary.
I was unable to find the reasons for the recreate of the Pods.
I could not find which Pod went for a recreate as the Pod is deleted and gone away. There are no logs in the journalctl regarding which Pod got recreated. Is there any way I can debug further to find the reason for the Pod recreate? Or what might be the reason for the PODs getting deleted?
Note: I have readiness and liveness probes defined, but these probes would act on container and would not lead to Pod recreate in my understanding.
已采纳解答
原帖链接 · Denis Romaniuk · CC BY-SA 4.0
Basically you need to check Pod's events (here is a tip how to do it).
Keep in mind, that events retention period is too short (approximately 1h), and you may need to store them somewhere else. Here is a good article how to do it with EFK stack
The most common reason of Pods recreation - Node unavailability. If Pod's Node is not available, Kubernetes recreates the Pods in other nodes.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
