<p>I am currently trying to deploy a spark example jar on a Kubernetes cluster running on IBM Cloud.</p>
<p>If I try to follow these <a href="https://spark.apache.org/docs/latest/running-on-kubernetes" rel="noreferrer">instructions to deploy spark on a kubernetes cluster</a>, I am not able to launch Spark Pi, because I am always getting the error message:</p>
<blockquote>
<p>The system cannot find the file specified</p>
</blockquote>
<p>after entering the code</p>
<pre><code>bin/spark-submit \
    --master k8s://&lt;url of my kubernetes cluster&gt; \
    --deploy-mode cluster \
    --name spark-pi \
    --class org.apache.spark.examples.SparkPi \
    --conf spark.executor.instances=5 \
    --conf spark.kubernetes.container.image=&lt;spark-image&gt; \
    local:///examples/jars/spark-examples_2.11-2.3.0.jar
</code></pre>
<p>I am in the right directory with the <code>spark-examples_2.11-2.3.0.jar</code> file in the <code>examples/jars</code> directory.</p>

<p>Ensure <code>your.jar</code> file is present inside the container image.</p>
<p><a href="https://spark.apache.org/docs/latest/running-on-kubernetes#cluster-mode" rel="nofollow noreferrer">Instruction</a> tells that it should be there:</p>
<blockquote>
<p>Finally, notice that in the above example we specify a jar with a
specific URI with a scheme of local://.  This URI is the location of
the example jar <strong>that is already in the Docker image</strong>.</p>
</blockquote>
<p>In other words, <code>local://</code> scheme is removed from <code>local:///examples/jars/spark-examples_2.11-2.3.0.jar</code> and the path <code>/examples/jars/spark-examples_2.11-2.3.0.jar</code> is expected to be available in a container image.</p>
