File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -12,18 +12,24 @@ HDFS `datanodes` running inside a kubernetes cluster. See the other chart for
12
12
13
13
### Usage
14
14
15
- 1 . Optionally, find the domain name of your k8s cluster that becomes part of
15
+ 1 . In some setup, the master node may launch a datanode. To prevent this,
16
+ label the master node with ` hdfs-datanode-exclude ` .
17
+ ```
18
+ $ kubectl label node YOUR-MASTER-NAME hdfs-datanode-exclude=yes
19
+ ```
20
+
21
+ 2 . Optionally, find the domain name of your k8s cluster that become part of
16
22
pod and service host names. Default is ` cluster.local ` . See ` values.yaml `
17
23
for additional parameters to change. You can add them below in ` --set ` ,
18
24
as comma-separated entries.
19
25
20
- 2 . Launch this helm chart, ` hdfs-datanode-k8s ` .
26
+ 3 . Launch this helm chart, ` hdfs-datanode-k8s ` .
21
27
22
28
```
23
29
$ helm install -n my-hdfs-datanode hdfs-datanode-k8s
24
30
```
25
31
26
- 3 . Confirm the daemons are launched.
32
+ 4 . Confirm the daemons are launched.
27
33
28
34
```
29
35
$ kubectl get pods | grep hdfs-datanode-
Original file line number Diff line number Diff line change 24
24
metadata :
25
25
labels :
26
26
name : hdfs-datanode
27
+ annotations :
28
+ # TODO: The following uses annotation to express affinity
29
+ # because Kubernetes 1.5 supports affinity only in annotation as alpha
30
+ # feature. In Kubernetes 1.6, this is now beta and supports regular
31
+ # YAML construct. Switch to the official syntax when we support 1.6.
32
+ scheduler.alpha.kubernetes.io/affinity : >
33
+ {
34
+ "nodeAffinity": {
35
+ "requiredDuringSchedulingIgnoredDuringExecution": {
36
+ "nodeSelectorTerms": [
37
+ {
38
+ "matchExpressions": [
39
+ {
40
+ "key": "hdfs-datanode-exclude",
41
+ "operator": "DoesNotExist"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ }
27
49
spec :
28
50
hostNetwork : true
29
51
hostPID : true
You can’t perform that action at this time.
0 commit comments