<p>When I use the following command:</p>
<pre><code>k logs &lt;podname&gt;-&lt;podhash&gt;
</code></pre>
<p>I get the pod log as expected.</p>
<p>But suppose I have multiple instances of this pod. For example:</p>
<pre><code>k logs &lt;podname&gt;-&lt;podhash1&gt;
k logs &lt;podname&gt;-&lt;podhash2&gt;
k logs &lt;podname&gt;-&lt;podhash3&gt;
</code></pre>
<p>If I use</p>
<pre><code>k logs -l app=podname
</code></pre>
<p>shouldn't I get an output of some aggregation of all these pods?</p>
<p>Because I'm not.</p>
<p>I guess I get only last 10 lines of one or all of the logs.</p>

dushkin
<p><code>k logs -l app=podname</code> will only print 10 logs.</p>
<p>The tail argument when using a selector will print logs of a pod to 10 lines length by default.</p>
<p>By executing the below command you will get the output logs to 100 lines:</p>
<pre><code>kubectl logs --tail=100  &lt;podname&gt;
</code></pre>
<p>For logs from all containers in pods you need to give</p>
<pre><code>kubectl logs &lt;podname&gt; --all-containers=true
</code></pre>
