<p>I recently had an event that resulted in my pod being evicted and in order to quickly reestablish service I proceeded to delete the pod which resulted in a new one being spun up. </p>

<p>Is there any way to describe or retrieve logs from a deleted pod so that I can perform RCA on why the pod was evicted in the first place?</p>

dfuentes
<p>From my experience, once you manually delete K8s Pod, the corresponded containers and their relevant logging data will be purged as well, thus <code>--previous</code> flag works only if the previous container instance still exists in Pod.</p>

<blockquote>
  <p>If true, print the logs for the previous instance of the container in
  a pod if it exists.</p>
</blockquote>

<p>You might consider in future implementing log aggregation software like <a href="https://www.fluentd.org/" rel="nofollow noreferrer">Fluentd</a>, <a href="https://github.com/gliderlabs/logspout#logspout" rel="nofollow noreferrer">Logspout</a> or <a href="https://www.elastic.co/guide/en/logstash/current/introduction.html" rel="nofollow noreferrer">Logstash</a> data collector in <a href="https://www.elastic.co/what-is/elk-stack" rel="nofollow noreferrer">ELK</a> stack.</p>
