代码拉取完成,页面将自动刷新
apiVersion: apps/v1
kind: Deployment
metadata:
name: spark-master
namespace: default
spec:
selector:
matchLabels:
app: spark-master
template:
metadata:
labels:
app: spark-master
spec:
containers:
- name: spark-master
image: spark:3.0.1
imagePullPolicy: Never
args: ["spark/sbin/start-all.sh"]
env:
- name: SPARK_MASTER_HOST
value: "spark-master"
- name: SPARK_MASTER_PORT
value: "7077"
- name: SPARK_MASTER_WEBUI_PORT
value: "8080"
ports:
- containerPort: 7077
protocol: TCP
- containerPort: 8080
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: spark-master
namespace: default
labels:
app: spark-master
spec:
type: ClusterIP
selector:
app: spark-master
ports:
- name: web-ui
port: 8080
targetPort: 8080
protocol: TCP
- name: spark-master
port: 7077
targetPort: 7077
protocol: TCP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: spark-master
namespace: default
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: spark.okkpp.io
http:
paths:
- path: /
backend:
serviceName: spark-master
servicePort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spark-worker
namespace: default
spec:
selector:
matchLabels:
app: spark-worker
template:
metadata:
labels:
app: spark-worker
spec:
containers:
- name: spark-worker
image: spark:3.0.1
imagePullPolicy: Never
args: ["spark/sbin/start-slave.sh", "spark://spark-master:7077"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。