<p>I am trying to copy a jar file to specific pod's container by executing below command.</p>

<p><code>kubectl cp local_policy.jar  podname:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/security</code>.</p>

<p>I am getting below error. </p>

<pre><code>rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"tar\\\": executable file not found in $PATH\"\n"
</code></pre>

<p>Please help.</p>

<p>tar binary is necessary to run cp. It is in the help page of kubectl cp:</p>

<pre><code>kubectl cp --help
Copy files and directories to and from containers.

Examples:
  # !!!Important Note!!!
  # Requires that the 'tar' binary is present in your container
  # image.  If 'tar' is not present, 'kubectl cp' will fail.
</code></pre>
