Create configuration with minimum 2 master nodes

I want (via ECK) to create a setup where

a) there will be three nodes in total having all roles

b) there will be a MINIMUM of 2 master nodes

Is the following configuration on the Elasticsearch resource legit?

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
  namespace: eck-poc
spec:
  version: 7.11.0
  nodeSets:
  - name: multirolenodes
    config:
      node.roles: ["master","ingest","data","remote_cluster_client","ml"]
      node.store.allow_mmap: false
      discovery.zen.minimum_master_nodes: 2

if not, what is the way to go about it and how can I then later validate that I indeed get (at least) 2 master nodes?

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

Thanks @pebrc , yes I had the spec.count in the truncated part of my mainfest.

Ah ok, sorry, wasn't sure if there was something missing. :+1: