<p>There are plenty of good examples creating Spark jobs using the Kubernetes Spark Operator and simply submitting a request like the following</p>
<pre><code>kubectl apply -f spark-pi.yaml
</code></pre>
<p>Where the spark-pi.yaml can be found at the this <a href="https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/examples/spark-pi.yaml" rel="nofollow noreferrer">here</a></p>
<p>Does anyone know the easiest way to submit a job like this with the Java K8s api?</p>

BillMan
<p>I have written a Application to submit spark job to Kubernetes where all you need to pass is Config Map (key value pair for app)</p>
<p>you could find the same in <a href="https://github.com/bkosaraju/utils" rel="nofollow noreferrer">github</a> Under class <code>RunSparkJobInKube(jobConfiguration: Map[String,String]) </code></p>
<p>this might help help you provide an idea for your requirement.</p>
<p>though this is scala you can call inside java as normal method.</p>
<p>here in this app I have integrated with IAM (aws specific) in case if you are interested in security.</p>
