Skip to content

Commit ac1905d

Browse files
committed
Operator can add and remove ES nodes
1 parent 6e144ab commit ac1905d

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

logging/efk-logging-elasticsearch.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@ include::modules/efk-logging-elasticsearch-persistent-storage-local.adoc[levelof
2929

3030
include::modules/efk-logging-elasticsearch-persistent-storage-empty.adoc[leveloffset=+2]
3131

32+
include::modules/efk-logging-elasticsearch-add-remove.adoc[leveloffset=+1]
33+
3234
include::modules/efk-logging-elasticsearch-exposing.adoc[leveloffset=+1]
3335

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/efk-logging-elasticsearch.adoc
4+
5+
[id='efk-logging-elasticsearch-add-remove_{context}']
6+
= Changing the number of Elasticsearch nodes
7+
8+
You can scale the number of nodes in Elasticsearch.
9+
10+
For example, if you want to increase redundancy, and use the `FullRedundancy` or `MultipleRedundancy` policy, you can add additional data nodes to increase the number of shard replicas in your cluster.
11+
12+
A {product-title} Elasticsearch cluster can contain three node types, or roles:
13+
14+
* *Master*. A master node performs actions across the cluster, such as creating or deleting an index, tracking which nodes are part of the cluster, and deciding which shards to allocate to which nodes. The master node must have access to the the *_data/_* directory. You can create 1 or 3 master nodes.
15+
* *Data*. A data node is where {product-title} stores Elasticsearch shards.
16+
* *Client*. A client node routes requests, handles the Elasticsearch reduce phase, and distributes bulk indexing.
17+
18+
A node can have any combination of these roles.
19+
20+
.Procedure
21+
22+
. To add a node, create a Cluster Logging Custom Resource (CR) to add a number of modes of a specific type:
23+
+
24+
[source,yaml]
25+
----
26+
apiVersion: "logging.openshift.io/v1alpha1"
27+
kind: "ClusterLogging"
28+
metadata:
29+
name: "clusterlogging"
30+
...
31+
nodes:
32+
- nodeCount: 2 <1>
33+
nodeSpec:
34+
resources: {}
35+
roles: <2>
36+
- client
37+
- data
38+
- master
39+
----
40+
<1> Specify the number of nodes of this type.
41+
<2> Specify the type of node.
42+
+
43+
[NOTE]
44+
====
45+
You can create 1 or 3 master nodes.
46+
====
47+
+
48+
For example, to scale the data and master nodes:
49+
+
50+
----
51+
nodes:
52+
- nodeCount: 1
53+
nodeSpec:
54+
resources: {}
55+
roles:
56+
- client
57+
- data
58+
- master
59+
storage: {}
60+
- nodeCount: 2
61+
nodeSpec:
62+
resources: {}
63+
roles:
64+
- data
65+
storage: {}
66+
- nodeCount: 3
67+
nodeSpec:
68+
resources: {}
69+
roles:
70+
- master
71+
storage: {}
72+
----
73+
74+
. To remove a node, create a Cluster Logging Custom Resource (CR) to reduce the number of modes of a specific type:
75+
+
76+
[source,yaml]
77+
----
78+
apiVersion: "logging.openshift.io/v1alpha1"
79+
kind: "ClusterLogging"
80+
metadata:
81+
name: "clusterlogging"
82+
...
83+
nodes:
84+
- nodeCount: 2 <1>
85+
nodeSpec:
86+
resources: {}
87+
roles:
88+
- client
89+
- data
90+
- master
91+
----
92+
<1> Specify the number of nodes of this type.
93+
+
94+
For example, to remove the master nodes added in the previous example, change the `nodeCount` variable for the master node to `1`:
95+
+
96+
----
97+
nodes:
98+
- nodeCount: 1
99+
nodeSpec:
100+
resources: {}
101+
roles:
102+
- client
103+
- data
104+
- master
105+
storage: {}
106+
- nodeCount: 2
107+
nodeSpec:
108+
resources: {}
109+
roles:
110+
- data
111+
storage: {}
112+
- nodeCount: 1
113+
nodeSpec:
114+
resources: {}
115+
roles:
116+
- master
117+
storage: {}
118+
----

0 commit comments

Comments
 (0)