<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 would recommend to look into <a href="https://github.com/fabric8io/kubernetes-client" rel="nofollow noreferrer">Fabric8 K8s client</a> used by Apache Spark in K8s or the official <a href="https://github.com/kubernetes-client/java" rel="nofollow noreferrer">Java K8s client</a>. With these libs you can submit the K8s resources using the code.</p>
