Files
GitOps/spark-cluster/base/workers.yaml
T
Janis Eccarius d3feb65eb3 fix(spark): increase worker cores to 4 to allow concurrent jobs
With SPARK_WORKER_CORES=1 and 2 workers the cluster has 2 total cores.
LiveDashboard holds both — batch jobs wait indefinitely. 4 cores per
worker gives 8 total, enough to run streaming + batch concurrently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 00:41:49 +02:00

47 lines
1.2 KiB
YAML
Executable File

apiVersion: apps/v1
kind: Deployment
metadata:
name: spark-worker
labels:
app.kubernetes.io/name: spark-worker
app.kubernetes.io/part-of: nowchess
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: spark-worker
template:
metadata:
labels:
app.kubernetes.io/name: spark-worker
app.kubernetes.io/part-of: nowchess
spec:
containers:
- name: spark-worker
image: apache/spark:4.0.3-scala2.13-java17-ubuntu
command:
- /opt/spark/bin/spark-class
- org.apache.spark.deploy.worker.Worker
- spark://spark-master:7077
env:
- name: SPARK_WORKER_CORES
value: "4"
- name: SPARK_WORKER_MEMORY
value: "512m"
ports:
- name: webui
containerPort: 8081
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: "1"
memory: 2Gi
volumeMounts:
- name: spark-events
mountPath: /spark-events
volumes:
- name: spark-events
emptyDir: {}