Search code examples
javaapache-sparkkubernetesspark-operator

Calling Kubernetes Spark Operator with Java api


There are plenty of good examples creating Spark jobs using the Kubernetes Spark Operator and simply submitting a request like the following

kubectl apply -f spark-pi.yaml

Where the spark-pi.yaml can be found at the this here

Does anyone know the easiest way to submit a job like this with the Java K8s api?


Solution

  • I would recommend to look into Fabric8 K8s client used by Apache Spark in K8s or the official Java K8s client. With these libs you can submit the K8s resources using the code.