<p>I have a Kubernetes pod running on Google Container Engine. It has been running for several days, writing to the log, without any restarts.</p>

<p>Why is the command <code>kubectl logs</code> only showing log rows from today?</p>

<p>Where does this limitation come from and is it based on time or number of log rows?</p>

<p>Logrotate is enabled by default on container engine VMs. You should be able to check conf at below location for docker container logs.</p>

<pre><code>cat /etc/logrotate.d/docker-containers
</code></pre>

<p>So when you run <code>kubectl logs</code>, it streams you from current log file. Past logs are already gzipped and also only N compressed files are available as per logrotate configuration.</p>

<p>You can check all containers log files at location <code>/var/log/containers</code> also sym linked to <code>/var/lib/docker/containers/$containerId/</code></p>

<p>You may also want to refer to documentation <a href="http://kubernetes.io/docs/user-guide/kubectl/kubectl_logs/" rel="noreferrer">http://kubernetes.io/docs/user-guide/kubectl/kubectl_logs/</a> and see if additional options can come to rescue.</p>
