<p>I have a pod with the following config:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  labels:
    name: demo
  name: demo
spec:
  containers:
    - name: demo
      image: ubuntu:14.04
      command:
        - sleep
        - "3600"
</code></pre>

<p>When I try to stop it, the SIGTERM is ignored by the sleep command, and it takes 30 seconds (the full default grace period) to stop.  I can also get on the pod and send the signal to the process (pid 1) manually, and it does not kill the pod.  How can I get sleep to die when a signal is sent to it?</p>

<p>Bash <a href="https://www.gnu.org/software/bash/manual/html_node/Signals.html" rel="noreferrer">ignores SIGTERM when there are no traps</a>. You can <a href="http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html" rel="noreferrer">trap</a> SIGTERM to force an exit. For example, <code>trap 'exit 255' SIGTERM; sleep 3600</code></p>
