加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
k8s-deploy.yaml 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
okkpp 提交于 2021-01-20 18:05 . upload tested
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"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化