<p>I have one shell script I want to run that remotely in POD, how I can do that?</p>
<pre><code> oc exec build-core-1-p4fr4 -- df -kh /   &lt;---  I want to use my script 
</code></pre>
<p>any way to do this remotely, like we do</p>
<pre><code>oc exec build-core-1-p4fr4 -- cat &gt;&gt; text &lt;&lt; shell.sh &lt;---- something like this 
</code></pre>
<p>I checked <code>oc rsh</code> but didn't find anything specific there.</p>

Samurai
<p>You can try the following command using <code>-i</code> option that allows to pass stdin to the container.</p>
<pre><code>$ oc exec -i your_pod_name -- /bin/bash -s &lt;&lt;EOF
#!/bin/bash
date &gt; /tmp/time
EOF

$ oc exec your_pod_name -- cat /tmp/time
Fri Nov 13 10:00:19 UTC 2020
$
</code></pre>
