Chapter 1. Overview of the Kubeflow Spark Operator (KSO)
The Kubeflow Spark Operator allows you to run Spark data processing applications in a distributed environment on Red Hat OpenShift AI. You can create custom resources (CRs) for specifying, running and surfacing Spark applications.
KSO for Apache Spark currently supports the following:
- Spark versions 4.0.1 and above.
-
When a
SparkApplicationcustom resource is created, the operator creates and runs aspark-submitjob that starts Spark driver and executor pods. - Native Cron support for running scheduled applications.
- Customization of Spark pods, including: mounting ConfigMaps/volumes and setting pod affinity.
- Automatic application restart with custom policies.
- Collecting and exporting application metrics and driver metrics to Prometheus.
1.1. Kubeflow Spark Operator (KSO) architecture Copy linkLink copied to clipboard!
The Spark operator consists of the following:
-
SparkApplicationController: A job that watches Create, Update and Delete events inSparkApplicationresources. -
Submission Runner: When a
SparkApplicationcustom resource is created, the operator creates and runs aspark-submitjob that starts Spark driver and executor pods. -
Spark Pod Monitor: Observes the
DriverandExecutorpods and updates the.statusfield of theSparkApplicationCR. -
Mutating Admission Webhook: A component that intercepts pod creation requests and injects ConfigMap mounts or Volumes into the
DriverandExecutorpods before they are scheduled.
1.2. IBM Power (ppc64le) considerations Copy linkLink copied to clipboard!
When deploying the Kubeflow Spark Operator on IBM Power (ppc64le) systems, ensure that both the Spark runtime image used by SparkApplication resources and the Spark Operator image are built for the target architecture.
The Spark Operator controller manages SparkApplication resources and launches Spark driver and executor pods using the image specified in the SparkApplication custom resource. If architecture-compatible images are not available, Spark runtime and Spark Operator images must be built from source for ppc64le.
For more information about building architecture-specific images, refer to the upstream Apache Spark and Kubeflow Spark Operator repositories:
- Apache Spark: https://github.com/apache/spark
- Kubeflow Spark Operator: https://github.com/kubeflow/spark-operator