<p>I have a kubernetes cluster running fine. It has 4 workers and 1 master with the dashboard to view the status. After running it for sometime, I looked at the <code>Restart</code> count of a node and it was <code>8</code>. I immediately ran the describe command to get any events but there was no events for that pod. However when I checked the logs of the containers, I found out that the node itself was powered down and up 4 times but dont know why it didnt had any events.</p>

<p>In another node, while looking at the restart count, I got event as <code>Sandbox changed</code> which means probably the node was powered down for sometime and thus the  <code>master</code> lost connection to it and so incremented the restart count by 2.</p>

<ol>
<li>I wanted to know how can we get the logs/debug related to this restart count to know why it was restarted.</li>
<li>Whenever a pod is recreated, does it takes up a new name.? If so, how can we get the events of the previous pod.</li>
<li><code>Does sandbox changed event</code> actually means that master actually lost connection.?</li>
</ol>

S Andrew
<p>Step by step:</p>

<ol>
<li><p>I'd check the kubelet and docker daemon logs, these restarts should appear somewhere in the logs and hopefully more info about what causes them. </p></li>
<li><p>Yes, the pod's name is unique thus it change everytime a pod is destroyed and recreated. You can try to find the pod with <code>kubectl get po -a</code>. Other solution is to get all events with <code>kubectl get events</code> and then filter to find your pod's events.</p></li>
<li><p>I've seen this error before and in my case it meant problem with the docker daemon networking. But I searched a bit in google and I saw many other reasons. Again, try to analyse the docker daemon and kubelet logs, and also dmesg. If you have doubts please add a link to the logs in your question and I'll try to help.</p></li>
</ol>
