Problem with elasticsearch on single-node cluster

Hello,
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:

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

configmap:

data:
  elasticsearch.yml: |-
    cluster.name: "docker-cluster"
    network.host: 0.0.0.0
    discovery.type: single-node

    node.roles: ingest

    xpack.security.enabled: true
    xpack.monitoring.collection.enabled: true
    xpack.monitoring.exporters.my_local:
      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:

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

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