<p>I'm running a Kubernetes/Docker job on Rundeck 2.11.5-1.  My job looks like:</p>

<pre><code>Job
  Sub Job 1
    Remote Command (kubectl run command)
    On error 
      Sub Job
  Sub Job 2
    Remote Command (kubectl run command)
    On error 
      Sub Job
</code></pre>

<p>The problem I'm having is that if Sub Job 1 fails, its "On Error" does not trigger and Sub Job 2 runs as if all was well.</p>

<p>Is there something that kubectl needs to return to indicate there was an error?  </p>

<p>What are some things I should look for/do to cause my job to stop on error.</p>

Todd
<p>I found the solution.  Add <code>--restart=Never</code> to the kubectl statement and the Rundeck job now correctly terminates on an apps failure.</p>
