Add more cluster components
This commit is contained in:
parent
16da1df16b
commit
0609270a81
|
@ -1,4 +1,10 @@
|
|||
---
|
||||
resources: [spark-ingress.yml, spark-service.yml]
|
||||
resources:
|
||||
- spark-ingress.yml
|
||||
- spark-master-controller.yml
|
||||
- spark-master-service.yml
|
||||
- spark-ui-proxy-controller.yml
|
||||
- spark-ui-proxy-service.yml
|
||||
- spark-worker-controller.yml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
|
23
spark/base/spark-master-controller.yml
Normal file
23
spark/base/spark-master-controller.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
kind: ReplicationController
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spark-master-controller
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
component: spark-master
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: spark-master
|
||||
spec:
|
||||
containers:
|
||||
- name: spark-master
|
||||
image: registry.k8s.io/spark:1.5.2_v1
|
||||
command: ["/start-master"]
|
||||
ports:
|
||||
- containerPort: 7077
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
14
spark/base/spark-master-service.yml
Normal file
14
spark/base/spark-master-service.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spark-master
|
||||
spec:
|
||||
ports:
|
||||
- port: 7077
|
||||
targetPort: 7077
|
||||
name: spark
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
name: http
|
||||
selector:
|
||||
component: spark-master
|
29
spark/base/spark-ui-proxy-controller.yml
Normal file
29
spark/base/spark-ui-proxy-controller.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
kind: ReplicationController
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spark-ui-proxy-controller
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
component: spark-ui-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: spark-ui-proxy
|
||||
spec:
|
||||
containers:
|
||||
- name: spark-ui-proxy
|
||||
image: elsonrodriguez/spark-ui-proxy:1.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
args:
|
||||
- spark-master:8080
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 120
|
||||
timeoutSeconds: 5
|
23
spark/base/spark-worker-controller.yml
Normal file
23
spark/base/spark-worker-controller.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
kind: ReplicationController
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spark-worker-controller
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
component: spark-worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: spark-worker
|
||||
spec:
|
||||
containers:
|
||||
- name: spark-worker
|
||||
image: registry.k8s.io/spark:1.5.2_v1
|
||||
command: ["/start-worker"]
|
||||
ports:
|
||||
- containerPort: 8081
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
|
Loading…
Reference in a new issue