<p>I can see the logs for a particular pod by running 'kubectl logs podName'. I have also seen that logs contains an option --log-dir flag, but it doesn't seem to be working. Is there some kind of configuration I can change, logs will be saved to a particular file on my host machine?</p>

<pre><code>kubectl logs pod_name &gt; app.log
</code></pre>
<p>for example, if you have a <strong>kube</strong> pod named <code>app-6b8bdd458b-kskjh</code> and you intend to save the <strong>logs</strong> from this pod to a file name <code>app.log</code> then the command should be</p>
<pre><code>kubectl logs app-6b8bdd458b-kskjh &gt; app.log
</code></pre>
