Problem with elasticsearch on single-node cluster

I have one single node Elasticsearch cluster that was working for months.
yesterday I have restarted the virtual server and after that it has problems.
now I have redeployed again the kubernetes configuration and got an error.

java.lang.IllegalArgumentException: node with [discovery.type] set to [single-node] must be master-eligible

this is part of the configuration:

      - image: elasticsearch:7.13.4
        - name: discovery.type
          value: single-node
        - name: cluster.initial_master_nodes
          value: null


  elasticsearch.yml: |- "docker-cluster"
    discovery.type: single-node

    node.roles: ingest true
    xpack.monitoring.collection.enabled: true
      type: local
      use_ingest: false

I will be happy if you can help me with this :slight_smile:
thank you !

Remove node.roles from your config map. A single node cluster must be master and data as well, not just ingest.

Thank you.
yes, i have changed the configuration and now it is ok:

  elasticsearch.yml: |- ${CLUSTER_NAME} ${NODE_NAME}
    discovery.seed_hosts: ${NODE_LIST}
    cluster.initial_master_nodes: ${MASTER_NODES}
    node.roles: [ master, data, ingest ] true
    xpack.monitoring.collection.enabled: true true

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.