<p>I want to copy a file from my Ubuntu machine to kube-controller-manager-ubuntu container. Currently I do that <a href="https://stackoverflow.com/questions/22907231/copying-files-from-host-to-docker-container">like this</a>, but I think it has more straight solution in Kubernetes.</p>

<p>Does anyone know how to copy a file to a Kubernetes container?</p>

yasin lachini
<p>it is similar to docker copy. </p>

<pre><code>kubectl cp /tmp/foo_dir &lt;some-pod&gt;:/tmp/bar_dir
</code></pre>

<p>Please refer here for examples and documentation</p>

<p><a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#cp" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#cp</a> </p>
