How to deploy Spark application jar file to Kubernetes cluster? How to deploy Spark application jar file to Kubernetes cluster? kubernetes kubernetes

How to deploy Spark application jar file to Kubernetes cluster?


Ensure your.jar file is present inside the container image.

Instruction tells that it should be there:

Finally, notice that in the above example we specify a jar with aspecific URI with a scheme of local://. This URI is the location ofthe example jar that is already in the Docker image.

In other words, local:// scheme is removed from local:///examples/jars/spark-examples_2.11-2.3.0.jar and the path /examples/jars/spark-examples_2.11-2.3.0.jar is expected to be available in a container image.


Please make sure this absolute path /examples/jars/spark-examples_2.11-2.3.0.jar is exists.

Or you are trying loading a jar file in current directory, In this case it should be an relative path like local://./examples/jars/spark-examples_2.11-2.3.0.jar.

I'm not sure if spark-submit accepts relative path or not.