<p>I would like to suspend the main process in a docker container running in a kubernetes pod.  I have attempted to do this by running </p>

<pre><code>kubectl exec &lt;pod-name&gt; -c &lt;container-name&gt; kill -STOP 1
</code></pre>

<p>but the signal will not stop the container.  Investigating other approaches, it looks like <code>docker stop --signal=SIGSTOP</code> or <code>docker pause</code> might work.  However, as far as I know, kubectl exec always runs in the context of a container, and these commands would need to be run in the pod outside the context of the container.  Does kubectl's interface allow for anything like this?  Might I achieve this behavior through a call to the underlying kubernetes API?</p>

<p>You could set the replicaset to 0 which would set the number of working deployments to 0. This isn't quite a Pause but it does Stop the deployment until you set the number of deployments to >0. </p>

<pre><code>kubectl scale --replicas=0 deployment/&lt;pod name&gt; --namespace=&lt;namespace&gt;
</code></pre>
