<p>I have been trying to find a solution to this among the previously asked questions, but I can't find one that works for my use case (which to me seems like a general use case)</p>
<p>So I have a load balancer service and 5 pods in a namespace that share a label <code>app=abc_application</code>. So when I want to follow logs in all pods simultaneously, I use this</p>
<p><code>kubectl logs -f -l app=abc_application -c abc_application_container</code></p>
<p>Now my use case looks like this. I have a request that failed an hour back and I want to check the logs. I wanted to use the <code>--since=60m</code> argument but that doesn't work with the above command.</p>
<p>Is there any alternative than getting logs of individual pods? Can this command not be integrated?</p>

Vishakha Lall
<p>you can also do the same with <strong>logs</strong></p>
<pre><code>kubectl logs &lt;POD name&gt; -n &lt;Namespace name&gt; --since-time='2021-09-21T10:00:00Z'
</code></pre>
<p>Using simple since with logs</p>
<pre><code>kubectl logs &lt;POD name&gt; -n &lt;Namespace name&gt; --since=60h (5s, 2m, or 3h)
</code></pre>
<p>If you want to tail logs by a few line</p>
<pre><code>kubectl logs &lt;POD name&gt; -n &lt;Namespace name&gt; --tail=200
</code></pre>
<p>If want to <strong>grep</strong> anything from logs</p>
<pre><code>kubectl logs  &lt;POD name&gt; -n &lt;Namespace name&gt; | grep &lt;string&gt;
</code></pre>
<p>With the above command, you can pass the container name with <strong>-c</strong> &amp; <strong>-l</strong> for label.</p>
<p>Reference :  <a href="https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_logs/" rel="nofollow noreferrer">https://jamesdefabia.github.io/docs/user-guide/kubectl/kubectl_logs/</a></p>
