Your configuration example is not what you want. discovery.zen.minimum_master_nodes is a setting that is deprecated/without effect in Elasticsearch 7.x
The second thing is that from an architecture point of view 2 master nodes is not a recommended setup as it gives no benefit over a single master node (quorum is n/2 + 1 = 2 ). I think you want 3 master nodes if you want additional resilience against (temporary) node failures.
In ECK you need to specify the count attribute to get any nodes at all, your current configuration would fail validation or in the absence of a validating webhook just not spin up any nodes.
Finally regarding the node roles: you do not need to specify the roles explicitly if you want a mixed role setup. By default each node has all roles already.
So I would suggest something like:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch-sample
namespace: eck-poc
spec:
version: 7.11.0
nodeSets:
- name: multirolenodes
count: 3
config:
# node.store.allow_mmap: false you only need this if your hosts are not configured correctly see https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-virtual-memory.html
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.