<p>I have a pod running in kubernetes with some sidecars tailing different log files from the &quot;master&quot; container with following command:</p>
<pre><code>tail -n+1 -f path/to/log.file
</code></pre>
<p>The problem is that, some days after deployed the pod, one of the sidecars stops tailing logs, while the rest of them continue to work normally.</p>
<p>The one that fails is always the same, tailing a bigger log file compared to the others.</p>
<p>I went into the sidecar and tailed manually and then I could see the logs normally.</p>
<p>The pod didn't restart and the log file was not recreated at the time the tailing stopped. The only think I can see is that the pod released some memory some minutes earlier, but I don't know how this could be related to the issue.</p>
<p>Any ideas what could cause this?</p>

<p>The issue was due to recreation of the log file.
the issue seems to be solved after replacing -f with -F.</p>
<pre><code>tail -n+1 -F path/to/log.file
</code></pre>
<p>Still not sure why in the other cases with log rotation there was no problem, but anyway this should not be an issue from now on</p>
