Skip to content

Commit

Permalink
feat: add spark-pi example
Browse files Browse the repository at this point in the history
  • Loading branch information
reinthal committed Dec 20, 2024
1 parent 4c4342a commit 0772a9d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions apps/base/kubeflow/spark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,44 @@ spec:
namespace: kubeflow
interval: 24h
values: []
---
apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
name: spark-pi
namespace: kubeflow
spec:
type: Scala
mode: cluster
image: "gcr.io/spark-operator/spark:v3.1.1"
imagePullPolicy: Always
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: "local:///opt/spark/examples/jars/spark-examples_2.12-3.1.1.jar"
sparkVersion: "3.1.1"
restartPolicy:
type: Never
volumes:
- name: "test-volume"
hostPath:
path: "/tmp"
type: Directory
driver:
cores: 1
coreLimit: "1200m"
memory: "512m"
labels:
version: 3.1.1
# Ensure the service account matches what is set up by the spark-operator HelmRelease
serviceAccount: spark-operator-spark
volumeMounts:
- name: "test-volume"
mountPath: "/tmp"
executor:
cores: 1
instances: 1
memory: "512m"
labels:
version: 3.1.1
volumeMounts:
- name: "test-volume"
mountPath: "/tmp"

0 comments on commit 0772a9d

Please sign in to comment.