<p>I have created a deployment which create a replica-set  and this replica-set create pods. Now I found couple of time the pod is getting deleted (do not know why) and then the replica-set create a new pod.</p>

<p>I am unable to find the details for the previous pod. I need to know why the pod was deleted. Kubernetes server version 1.5.6. I am also not seeing anything in events. Whereas I can see some events in newer version of Kubernetes server.</p>

<p>Please let me know in case of any more information required.</p>

<p>I have given a simple use case here where I created a deployment and then deleted pod inside it:</p>

<pre><code>[kubernate-test]$ kubectl run pod-deleted-reason-why --image=busybox  -- sh -c 'while true; do echo i am running, but not sure can fail any time;sleep 10;done'
deployment "pod-deleted-reason-why" created
[kubernate-test]$ kubectl get deployments |grep reason
pod-deleted-reason-why    1         1         1            1           32s
[kubernate-test]$ kubectl get replicaset |grep reason
pod-deleted-reason-why-59c9df7594    1         1         1         59s
[kubernate-test]$ kubectl get pods |grep reason
pod-deleted-reason-why-59c9df7594-nr8rs    1/1       Running            0          1m
[kubernate-test]$ kubectl delete pod pod-deleted-reason-why-59c9df7594-nr8rs
pod "pod-deleted-reason-why-59c9df7594-nr8rs" deleted
[kubernate-test]$ kubectl get pods |grep reason
pod-deleted-reason-why-59c9df7594-qpq5b    1/1       Running            0          1m
</code></pre>

<p>Here I manually deleted the pod - <code>pod-deleted-reason-why-59c9df7594-nr8rs</code> and replica-set has created a new pod - <code>pod-deleted-reason-why-59c9df7594-qpq5b</code>.</p>

<p>If the the pod was delete for some other reason (say node reboot) how could I know why the pod was deleted?</p>

<p>You can use <code>kubectl describe pod ...</code> to see more information</p>

<p>EDIT:</p>

<p>Correction, I didn't realize you were deleting things yourself, if you manually delete the pod I don't think you can get that information back. If a pod has existed and then someone deletes it the only way that happens is if you actually delete it. If it gets restarted for whatever reason the pod name stays the same.</p>
