<p>I'm trying to launch spark on Kubernetes per the instructions on the official website:
<a href="https://spark.apache.org/docs/latest/running-on-kubernetes.html" rel="nofollow noreferrer">Spark Kubernetes</a>.
I followed the instructions to create an image using their provided script as followings:</p>
<pre><code>./bin/docker-image-tool.sh -r &lt;repo&gt; -t my-tag -p ./kubernetes/dockerfiles/spark/bindings/python/Dockerfile build

</code></pre>
<p>For the <code>&lt;repo&gt;</code> I used pyspark.
My spark submit for the Kubernetes is as follows:</p>
<pre><code>./bin/spark-submit \
    --master k8s://https://&lt;ipaddress&gt;:&lt;port&gt;\
    --deploy-mode cluster \
    --name spark-pi \
    --class org.apache.spark.examples.SparkPi \
    --conf spark.executor.instances=5 \
    --conf spark.kubernetes.container.image=pyspark/spark-py:my-tag \
    --conf spark.kubernetes.file.upload.path=/usr/local/spark/examples \
    local:///usr/local/spark/examples/spark-examples_2.12-3.0.0.jar
</code></pre>
<p>The kubernetes set ups looks ok, however the pods are having issues with the images it pulled which results in restart. I'm not sure if I have the right nomenclature of the image.</p>

Vinh Tran
<p>The example uses pyspark/spark-py:my-tag as container image which should be present , As this is not present you are getting the error as Image Pull Error. You can push your image to dockerhub or your private registry and use it as <code>example.com/repo/spark:v1.0.0</code> where example.com is your private registry and repo is the repository you have there.</p>
<p>Also when you run <code>./bin/docker-image-tool.sh -r &lt;repo&gt; -t my-tag build</code> , you need to specify a repo. Your command should be like  <code>./bin/docker-image-tool.sh -r docker.io/myrepo -t v2.3.0 -p kubernetes/dockerfiles/spark/bindings/python/Dockerfile build</code></p>
<p>If you are using minikube then building images will do so directly into minikube's Docker daemon.There is no need to push the images into minikube in that case, they'll be automatically available when running applications inside the minikube cluster.</p>
