I am trying to setup elasticsearch 7.6.2 on kubernetes. I have created with statefulset with replica 2. I have setup elastic.yaml for configuration as following
elasticsearch.yml: |-
cluster.name: ${CLUSTER_NAME}
cluster.initial_master_nodes: elasticsearch-0
network.host: 0.0.0.0
But after applying files, second node is not joining the elastic cluster
ERROR: master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [elasticsearch-0] to bootstrap a cluster: have discovered [{elasticsearch-1}
How to solve this ?