<p>I have the strange problem that a Spark job ran on Kubernetes fails with a lot of "Missing an output location for shuffle X" in jobs where there is a lot of shuffling going on. Increasing executor memory does not help. The same job run on just a single node of the Kubernetes cluster in local[*] mode runs fine however so I suspect it has to do with Kubernetes or underlying Docker.
When an executor dies, the pods are deleted immediately so I cannot track down why it failed. Is there an option that keeps failed pods around so I can view their logs?</p>

rabejens
<p>You can view the logs of the previous terminated pod like this:</p>

<pre><code>kubectl logs -p &lt;terminated pod name&gt;
</code></pre>

<p>Also use <code>spec.ttlSecondsAfterFinished</code> field of a Job as mentioned <a href="https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/#ttl-controller" rel="nofollow noreferrer">here</a></p>
