Stackable Docs Hub

Stackable

Stackable

Stackable Operator for Apache Spark

Apache Spark™ on the
Stackable Data Platform

Run Spark natively on Kubernetes

Simplified, reliable Spark job management

A Spark job is easy to write and surprisingly hard to run well in production. The Stackable Operator takes the work you submit as a SparkApplication CRD and turns it into the right Kubernetes objects – driver, executors, resources, logging – and lets you add dependencies and images. From a simple batch job to streaming and ML workloads, it just works. Run it on-prem, air-gapped or in a sovereign cloud – no vendor lock-in.

Spark on the Stackable Data Platform

Why Apache Spark in the Stackable Data Platform (SDP)

Apache Spark is a powerful open-source analytics engine for large-scale data processing. With APIs in Java, Scala, Python and R, it handles both batch and real-time workloads. Integrated with Trino, S3 and Airflow, Spark can be orchestrated to turn vast datasets into the features, models and insights that make analytics and AI possible.

Unified data processing & analytics

Batch, real-time streaming, and built-in libraries for SQL, machine learning (MLlib), and graph processing (GraphX) in a single framework – diverse workflows and comprehensive analysis in one place.

Multi-language support

Developers and data scientists can dive right in with Java, Scala, Python, or R – APIs that speak their language.

Scalability & fault tolerance

In-memory processing and a fault-tolerant architecture handle large-scale processing efficiently and reliably.

Enhanced developer productivity

Spark Connect lets developers build clients in Python, Go, .NET and Rust for flexible, decoupled development.

What does the Stackable Operator add for Apache Spark?

Per-job dependencies and versions

Each job is a SparkApplication with its own image and dependencies (volumes, Maven or pip), letting different Spark versions run side by side in one cluster, ideal for testing, gradual migration or teams with different needs.

Spark Connect, provisioned for you

The operator provisions Spark Connect servers. Developers connect from Python, Go, .NET, Rust and their own IDEs without installing Spark locally.

Debug completed jobs with the History Server

A configurable Spark History Server reads event logs from S3, exposing execution metrics, stage timings and debugging detail for finished applications.

What do all Stackable operators have in common?

One operator framework (Rust)

Every operator follows the same CRD pattern with Roles, RoleGroups and ConfigOverrides. Learn one operator, and you find your way around the next one instantly.

Infrastructure-as-Code

Every data app is a YAML CRD that lives in Git – reviewable, lintable and CI/CD-ready. The same definition works on Dev, Test and Prod.

Lifecycle management (Day-2 operations)

Deployment, restarts, certificate rotation and rolling upgrades are handled automatically – including pod restarts when configs or secrets change. And because you need to see what’s running, monitoring and logging come built in: Prometheus, Vector and OpenTelemetry feed ready-made Grafana dashboards – one observability setup for the whole platform.

Security by default:

TLS, Kerberos for HDFS, OIDC login and OPA-based fine-grained authorization, all configurable per CRD. Daily vulnerability scans, SBOMs and cosign-signed images keep the whole platform patched – so you don’t track a dozen upstream projects yourself.

Kubernetes-native and modular

Runs on-prem, in any cloud or on a laptop, with no vendor lock-in – and explicit air-gapped support. Install only the operators you need, and add more later without touching the rest.

OpenShift-certified

All operators are Red Hat–certified and install directly from the Red Hat Certified Operators Catalog (OperatorHub) – compatible with Security Context Constraints and RBAC. Certified operation via a Stackable subscription.

Use Cases for Spark

Data processing & ETL

Transform, clean and prepare data from many sources. With Stackable, Spark jobs run reliably – for faster pipelines and lower operational cost.

Machine learning & AI

Train and deploy models on large datasets with Spark MLlib and popular frameworks. The operator manages resources dynamically, supporting both experimentation and production workloads.

Real-time stream processing

Combined with Apache Kafka, Spark Streaming powers real-time analytics – from fraud detection and IoT monitoring to customer behavior analysis – on clusters that stay stable and scale with incoming streams.

FAQ - Frequently Asked Questions about Spark and Stackable

How do I install the Spark operator on Kubernetes?

The recommended approach is using stackablectl, which handles deployment, configuration and dependency management automatically. Helm charts are also supported if you prefer standard Kubernetes tooling. On OpenShift, the operator can be installed via the Red Hat Certified Operators Catalog.

Start by following the Getting Started guide in the operator documentation. Create a SparkApplication CRD that specifies the container image, main application file, executor and driver resources, and any necessary environment variables, then apply it with kubectl apply. The operator automatically provisions all required Kubernetes resources, schedules the job and manages its lifecycle, including log collection and event tracking.

The supported Apache Spark versions are listed in the Stackable documentation. Pick one that matches a compatible Spark image for your deployment, or bring your own image from a custom registry for patched versions or extra libraries. The operator runs multiple versions concurrently, so you can adopt new releases at your own pace.
Click here for the current list.

Yes, by specifying different container images for each SparkApplication. Each application runs independently, so multiple versions of Spark can coexist in the same Kubernetes cluster without conflicts. This is useful for testing new versions, migrating workloads gradually, or supporting teams with different dependency requirements.

Dependencies can be added in several ways: custom container images that include libraries or packages; mounted volumes containing JARs or configuration files; Maven coordinates for Java/Scala libraries (Iceberg, Hadoop connectors, etc.); and Python packages via pip for PySpark jobs. The operator documentation provides examples for each method, ensuring reproducibility and version control for dependencies.

Each driver and executor pod includes a Vector sidecar that collects logs in a structured, centralized format. Logs can also be written to S3 for long-term storage. The Spark History Server can read event logs from S3, letting you browse completed applications, view metrics and debug past runs easily – ensuring operational transparency and simplifying monitoring and troubleshooting.

Yes. You can configure S3 as a data source via the CRD, specifying credentials through Secrets and SecretClasses. Spark can read and write directly from these object stores, enabling integration with data lakes and cloud-native storage systems without additional ETL layers.

Yes. The operator documentation provides guidance for configuring Kerberos authentication for HDFS access. Stackable’s Secret Operator can generate keytabs and manage credentials securely. TLS and RBAC configurations ensure that workloads run securely within multi-tenant clusters.

Yes. Spark combines with other Stackable operators for end-to-end workflows: trigger Spark jobs from Airflow for orchestrated ETL pipelines, query Lakehouse tables with Trino after Spark transformations, and visualize aggregated results with Superset. Integration patterns are documented in the Stackable platform guides for reliable, scalable, maintainable analytics pipelines.

Yes. You can define resource requests and limits per role, such as driver or executor pods, and even per role-group. This allows you to optimize CPU, memory, and storage allocation for each workload type, ensuring high utilization without over-provisioning. Resource tuning also helps maintain cluster stability under mixed workloads and heavy usage.

The operator has been tested on major managed and self-hosted Kubernetes platforms: EKS, AKS, GKE, OpenShift, IONOS and K3s. This flexibility lets you deploy Spark reliably across cloud providers or on-premise infrastructure, while still benefiting from declarative management and operator automation.

Resources - Learn how to use the Stackable Operator for Apache Spark

Getting Started & Installation

Install the Spark Operator with stackablectl, Helm charts or the OpenShift catalog, then submit your first Spark job on Kubernetes – a step-by-step path from setup to your first run.

Operator Overview & Docs

Overview of the Stackable Operator for Apache Spark, including supported features, CRDs and configuration options for running Spark on Kubernetes.

GitHub Repository

The official open-source repository for the Stackable Spark Operator, containing source code, Helm charts and example configurations. Ideal for developers and operators who want to explore configurations, contribute or automate deployments.

Demo

The spark-k8s-anomaly-detection-taxi-data demo uses Spark to train an anomaly-detection model on New York taxi data from S3 and writes the results into a Trino table. Installable with a single stackablectl command.

Subscribe to our Newsletter

With the Stackable newsletter, you’ll always stay up to date on the latest from Stackable!

illustration of an envelope entering a mail box
An illustration of a laptop and phone on a desk

Newsletter

Subscribe to the newsletter

With the Stackable newsletter you’ll always be up to date when it comes to updates around Stackable!