
As part of deploying a high-performance and secure Elastic cluster, configuring a master node is a crucial step. This node will serve as the central point to which the other nodes in the cluster connect, ensuring data stability and consistency.
In this article, we will guide you step by step through the initial installation and configuration of the Elastic master node.
1. Elastic installation
Before starting the configuration, make sure you have properly installed Elastic on your system.
To do so, refer to our article Elastic Installation: Simple Guide: https://www.insitu-it.com/en/blogue/installation-delasticsearch-guide-simple
Also, ensure that you import the necessary certificates to secure communications within the cluster.
2. Master node configuration
Once Elastic is installed, we will move on to configuring the master node. This node will play a crucial role in orchestrating communications and managing data between the different nodes in the cluster.
a. Open the configuration file
Use the text editor of your choice to edit the file. elasticsearch.yml :
# with Vim or with Nano
vim /etc/elasticsearch/elasticsearch.yml
# using Vim or Nano
nano /etc/elasticsearch/elasticsearch.yml
b. Edit the essential settings
In this file, locate the following lines and make sure to uncomment the necessary properties (by removing the # symbol at the beginning of each line).
Settings to configure:
CLUSTER
cluster.name: your_cluster_name
NODE
node.name: master_node_name
PATHS
path.data: /var/lib/elasticsearchpath.logs: /var/log/elasticsearch
NETWORK
network.host: 0.0.0.0 # Or the specific IP address of your network interface
DISCOVERY
discovery.seed_hosts: ["node_ip_address"]cluster.initial_master_nodes: ["master_node_name"]
c. Define the node roles
Depending on the version of Elastic you are using, the configuration differs slightly:
For versions prior to 8.0:
node.master: true
node.data: true
node.ingest: true
node.ml: false
For Elastic 8.0 and later versions:
node.roles: [ master, data, ingest ]
INSITU IT Tip: Even if your primary node is the master, it is recommended to also assign it the data and ingest roles for greater flexibility.
d. Additional configuration for non-master nodes
For nodes that will not act as master, make sure to add the following attribute to define the rack in your architecture. This helps improve data distribution and redundancy within your cluster:
node.attr.rack: nom_du_rack
INSITU: your Elastic ally
Properly configuring a master node in Elastic is essential to ensure the resilience and performance of your environment. Take the time to carefully define the roles and settings of each node to guarantee a smooth and secure scaling process.
Want to go further? At INSITU, we support you in setting up, optimizing, and monitoring your Elastic infrastructures. Contact us for a personalized consultation!
Discover more recent posts

Complete Guide: Installing and Configuring SSL/TLS Certificates on Elasticsearch and Kibana

FAQ – Why is data essential to modern mining management?

How to Install and Configure a Master Node for Your Elastic Cluster?

