-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdeploy-datanode.yml
62 lines (62 loc) · 1.25 KB
/
deploy-datanode.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hadoop-node
spec:
serviceName: "hadoop-node"
replicas: 1
selector:
matchLabels:
app: hadoop-node
template:
metadata:
labels:
app: hadoop-node
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- hadoop-node
topologyKey: "kubernetes.io/hostname"
containers:
- name: hadoop-node
image: cclient/hadoop:2.8.3-datanode
# imagePullPolicy: Always
imagePullPolicy: IfNotPresent
ports:
- containerPort: 22
name: ssh
---
apiVersion: v1
kind: Service
metadata:
name: hadoop-node
labels:
app: hadoop-node
spec:
ports:
- name: ssh
port: 22
targetPort: 22
- name: "8040"
port: 8040
targetPort: 8040
- name: "8042"
port: 8042
targetPort: 8042
- name: "50010 "
port: 50010
targetPort: 50010
- name: "50020"
port: 50020
targetPort: 50020
- name: "50075"
port: 50075
targetPort: 50075
selector:
app: hadoop-node