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.