Created
July 7, 2019 22:02
-
-
Save vrann/474769c294e0138132bdfb21045383b3 to your computer and use it in GitHub Desktop.
Master pod for Standalone Spark deployed on K8s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: spark-master | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: spark-master | |
template: | |
metadata: | |
labels: | |
component: spark-master | |
spec: | |
hostname: spark-master | |
containers: | |
- name: spark-master | |
image: spark-hadoop:1.0.23 | |
command: ["/opt/spark/sbin/start-master.sh"] | |
terminationMessagePolicy: FallbackToLogsOnError | |
ports: | |
- containerPort: 4040 | |
- containerPort: 7077 | |
- containerPort: 8080 | |
env: | |
- name: MY_POD_IP | |
valueFrom: | |
fieldRef: | |
fieldPath: status.podIP | |
- name: SPARK_NO_DAEMONIZE | |
value: "true" | |
resources: | |
requests: | |
cpu: 100m | |
volumeMounts: | |
- name: varlog | |
mountPath: /opt/spark/logs/ | |
- name: datadir | |
mountPath: /opt/spark/data/ | |
volumes: | |
- name: varlog | |
hostPath: | |
# directory location on host | |
path: /tmp/logs | |
# this field is optional | |
type: Directory | |
- name: datadir | |
hostPath: | |
# directory location on host | |
path: HOME/spark-2.4.3-bin-hadoop2.7/datafiles/ | |
# this field is optional | |
type: Directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment