<p>One of my pods keeps restarting sometimes. When I do <code>kubectl describe pod &lt;podName&gt;</code> I only get the Last state and not the ones before. </p>

<p>So to find the root of the problem it would be helpful to see all the other states before. </p>

SDD
<p>If you use <code>kubectl get pods --output=yaml</code> you will get detailed information about pods in <code>yaml</code> format, you will be able to see 3 last states.</p>

<p>You can also check the last events which was already mentioned by you, using <code>kubectl describe pod &lt;podName&gt;</code>.</p>

<p>Also as stated in Kubernetes documentation <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/" rel="nofollow noreferrer">Determine the Reason for Pod Failure</a>, you can use <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/#customizing-the-termination-message" rel="nofollow noreferrer">Customise the termination message</a> and move <code>/dev/termination-log</code> to a <code>/tmp/</code> which should be mounted as a separate storage using for example <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">Persistent Volumes</a></p>

<p>If you are looking into more detailed information regarding storing logs, you would need to check <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/logging-elasticsearch-kibana/" rel="nofollow noreferrer">Logging Using Elasticsearch and Kibana</a> or <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver/" rel="nofollow noreferrer">Logging Using Stackdriver</a>.</p>
