fix(spark): replace shared spark-events PVC with emptyDir to fix Multi-Attach error
local-path provisioner is RWO-only; attaching a single PVC to master, two workers, history-server, and streaming pod on separate nodes causes Multi-Attach errors. Each pod now gets its own ephemeral emptyDir for /spark-events. Event logging confs removed from CronJobs and streaming Deployment (logs are pod-local and do not persist across restarts). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,8 +40,7 @@ spec:
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@@ -42,8 +42,7 @@ spec:
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: spark-events
|
||||
labels:
|
||||
app.kubernetes.io/name: spark-cluster
|
||||
app.kubernetes.io/part-of: nowchess
|
||||
spec:
|
||||
# ReadWriteOnce for k3d/local-path compatibility.
|
||||
# NOTE: k3d uses the local-path provisioner which only supports RWO.
|
||||
# For production with multiple concurrent writers (workers + history server),
|
||||
# replace with a RWX-capable storage class such as NFS or Longhorn and
|
||||
# change accessModes to [ReadWriteMany].
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
# No cluster-level PVCs needed.
|
||||
# Analytics output and streaming checkpoint PVCs live in spark-analytics/base/pvc.yaml.
|
||||
# spark-events PVC removed: local-path provisioner is RWO-only; sharing a single PVC
|
||||
# across master, workers, and history-server on different nodes causes Multi-Attach errors.
|
||||
# Event logs now use emptyDir (pod-local, ephemeral) on each pod.
|
||||
|
||||
@@ -43,5 +43,4 @@ spec:
|
||||
mountPath: /spark-events
|
||||
volumes:
|
||||
- name: spark-events
|
||||
persistentVolumeClaim:
|
||||
claimName: spark-events
|
||||
emptyDir: {}
|
||||
|
||||
Reference in New Issue
Block a user