<p>I'm trying to delete an existent job using</p>

<pre><code>kubectl delete job/job-name -n my-namespace
</code></pre>

<p>But this error is displayed</p>

<pre><code>caling the resource failed with: Job.batch "kong-loop" is invalid:
spec.template: Invalid value: api.PodTemplateSpec{...}: field is
immutable; Current resource version 12189833
</code></pre>

<p>The solution posted by @esnible does work in this scenario, but it is simpler do these  steps:</p>

<ol>
<li>Delete job with cascade false</li>
</ol>

<p><code>kubectl delete job/jobname -n namespace --cascade=false</code></p>

<ol start="2">
<li>Delete any pod that exists </li>
</ol>

<p><code>kubectl delete pod/podname -n namespace</code></p>

<p>Solution found at in this google groups discussion <a href="https://groups.google.com/forum/#!topic/kubernetes-users/YVmUgktoqtI" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/kubernetes-users/YVmUgktoqtI</a></p>
