<p>I have a pod in a Kubernetes(k8s) which has a Java application running on it in a docker container. This application produces logs. I want to move these log files to another amazon EC2 machine. Both the machines are linux based. How can this be done. Is it possible to do so using simple <code>scp</code> command?</p>

mohd shoaib
<p>To copy a file from a pod to a machine via scp you can use the following command:</p>

<pre><code>kubectl cp &lt;namespace&gt;/&lt;pod&gt;:/path/inside/container /path/on/your/host
</code></pre>
