Elasticsearch Basic Security Setup

Hello,

I want to setup basic security in multi node cluster
what should be

discovery.type: single-node
for a multi node cluster

Since when i used a single node cluster my configuration was
xpack.security.enabled: true
discovery.type: single-node

what should we use for multi nodes

I am having a testing 2 node cluster
1 master node and 2 data nodes

Do not use

discovery.type

and set

xpack.security.enabled: true

to all nodes

Hey @ikakavas
Thankyou for the response but my node is not starting when i am setting up

xpack.security.enabled: true

both nodes arent starting
my config file i.e elasticsearch.yml is

cluster.name: test-master
node.master: true
node.data: true
node.ingest: true
node.name: masternode
network.host: 0.0.0.0
discovery.seed_hosts: ["IP1", "IP2"]
cluster.initial_master_nodes: ["masternode"]
xpack.security.enabled: true

and 2nd config is

cluster.name: test-master
node.master: false
node.data: true
node.ingest: true
node.name: datanode
network.host: 0.0.0.0
discovery.seed_hosts: ["IP1", "IP2"]
cluster.initial_master_nodes: ["masternode"]
xpack.security.enabled: true

Please read through our documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html

If you have any specific problems we can assist, but it's of little use repeating the docs here.

For future reference:

both nodes arent starting

doesn't allow anyone to provide any meaningful help. For future issues you might have, you need to also add the exact error message and the logs.

For now, reading through the documentation will help you get going