<p>I'm killing a process inside a pod with command:</p>

<pre><code>kubectl  exec ${pod} -- bash -c "kill -9 \`ps -ef | grep ${something} | grep -v grep | awk '{print \$2}'\` &gt;/dev/null 2&gt;&amp;1" &gt;/dev/null 2&gt;&amp;1
</code></pre>

<p>and I get <code>"command terminated with exit code 137"</code> message that indicates that process <code>${something}</code> was really killed. How can I redirect the exit code?</p>

NZL
<p>Running the Process:</p>

<pre><code>kubectl --namespace=magellan exec $pod 2&gt;/dev/null -- bash -c "some remote command"
</code></pre>

<p>And after it killing the process does not redirect the error to screen</p>
