<p>If I run, for example, <code>kubectl logs --namespace kube-system kube-apiserver-XXXX | head -n 25</code> I can see the output with only a timestamp and no date. I can't tell if these are from the inception of the pod or not.</p>

<p>Generally speaking, how long do a pod's logs last in Kubernetes?</p>

<p><a href="https://unofficial-kubernetes.readthedocs.io/en/latest/concepts/cluster-administration/logging/#:%7E:text=Kubernetes%20performs%20log%20rotation%20daily,five%20logging%20rotations%20per%20container." rel="nofollow noreferrer">From k8s unofficial docs</a></p>
<blockquote>
<p>Kubernetes performs log rotation daily, or if the log file grows beyond 10MB in size. Each rotation belongs to a single container; if the container repeatedly fails or the pod is evicted, all previous rotations for the container are lost. By default, Kubernetes keeps up to five logging rotations per container.</p>
</blockquote>
<p>The container runtime attaches the current timestamp to every line produced by the application. You can display these timestamps by using the --timestamps=true option while running kubectl logs.</p>
