<p>I'm new to kubernetes and am still trying to extract log from a few lines and write it, if anyone can help me what commands i should execute.</p>

<p>If the pod is named bino, and i wanted to extract the lines corresponding to the error unable-to-access-website, and then write them to a certain location, say John/Doe/bino. How would i do this is there a easy command?</p>

<p>I tried using kubectl log bino, but it just dumps all the output on the terminal, if i wanted to write certain parts how can i do it? Thanks!</p>

<p>Or if anyone has played around in katacoda i would appreciate a link to a similar example.</p>

Tyler Blake
<p>You can use grep in linux to fetch the relevant log messages you want:</p>

<pre><code>kubectl log bino | grep "error unable-to-access-website" &gt;&gt; John/Doe/Bino/log.txt
</code></pre>

<p>Hope this helps.</p>
