title: Running background process with kubectl exec
body: <p>I am trying to execute a Python program as a background process inside a container with <code>kubectl</code> as below (<code>kubectl</code> issued on local machine):</p>
  <p><code>kubectl exec -it &lt;container_id&gt; -- bash -c &quot;cd some-dir &amp;&amp; (python xxx.py --arg1 abc &amp;)&quot;</code></p>
  <p>When I log in to the container and check <code>ps -ef</code> I do not see this process running. Also, there is no output from <code>kubectl</code> command itself.</p>
  <ul>
  <li>Is the <code>kubectl</code> command issued correctly?</li>
  <li>Is there a better way to achieve the same?</li>
  <li>How can I see the output/logs printed off the background process being run?</li>
  <li>If I need to stop this background process after some duration, what is the best way to do this?</li>
  </ul>