Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Unable to deploy Elasticsearch 8 with helm as single node #1759

Open
robertvanloenhout opened this issue Jan 17, 2023 · 8 comments
Open

Unable to deploy Elasticsearch 8 with helm as single node #1759

robertvanloenhout opened this issue Jan 17, 2023 · 8 comments

Comments

@robertvanloenhout
Copy link

robertvanloenhout commented Jan 17, 2023

I'd like to deploy Elasticsearch 8.5.1 using helm and only use a single node to reduce memory usage on minikube.
This issue is similar to #312, but I'll summarize it here because that issue is closed
because originally it was not an issue regarding Elasticsearch 8.

The deployment is on minikube 1.28.0 with helm 3.8.2

When I set replicas to 1 then elasticsearch pod will produce these warning messages and never become operational:

master not discovered or elected yet, an election requires at least 2 nodes

We can set discovery type to single-node by adding it to the values file

We can do that like this:

esConfig:
  elasticsearch.yml: |
    discovery:
      type: single-node

Or we can do it like this:

extraEnvs:
  - name: discovery.type
    value: single-node

This produces the following error:

setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]

We can try setting the initial master nodes it to empty like this:

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

This still produce the following error:

setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]

We can also try it like this:

extraEnvs:
  - name: discovery.type
    value: single-node
  - name: cluster.initial_master_nodes
    value: ""

This will produce this error:

null-valued setting found for key [cluster.initial_master_nodes]

We can try setting the initial master nodes to null like this:

esConfig:
  elasticsearch.yml: |
    discovery:
      type: single-node
    cluster:
      initial_master_nodes: null

or like this:

extraEnvs:
  - name: discovery.type
    value: single-node
  - name: cluster.initial_master_nodes
    value: null

Either way the elasticsearch pod will faill immediately with the following error:

null-valued setting found for key [cluster.initial_master_nodes] found
@dpfaffenbauer
Copy link

I figured it out:

values:
      roles: []
      extraEnvs:
        - name: discovery.type
          value: single-node
        - name: node.roles
          value: master,data,data_content,data_hot,data_warm,data_cold,ingest,ml,remote_cluster_client,transform

@robertvanloenhout
Copy link
Author

robertvanloenhout commented Apr 14, 2023

@dpfaffenbauer Thanks! This seems to work. I'll try it our for some time and close this issue if I don't encounter any problems.
Still hope that this can be made easier though some day.

@robertvanloenhout
Copy link
Author

@dpfaffenbauer Unfortunately after a restart it didn't work anymore. I have the following warning message:

This node is a fully-formed single-node cluster with cluster UUID [uK64OL3nSTyOiW9wPZWBPQ], but it is configured as if to discover other nodes and form a multi-node cluster via the [discovery.seed_hosts=[elasticsearch-master-headless]] setting. Fully-formed clusters do not attempt to discover other nodes, and nodes with different cluster UUIDs cannot belong to the same cluster. The cluster UUID persists across restarts and can only be changed by deleting the contents of the node's data path(s).

@dpfaffenbauer
Copy link

@robertvanloenhout Haven't had that issue yet, will try to fix it once I get it.

@yonzmeer
Copy link

yonzmeer commented May 8, 2023

Any update on this?

@dpfaffenbauer
Copy link

We had the issue too now, I manually patched the statefulset to fix it.

@ShrawanLakhe
Copy link

@dpfaffenbauer how did you work on the fixes?

i have similar issues with elastic search 8.7

@justmike1
Copy link

justmike1 commented May 13, 2023

same issue
@dpfaffenbauer what did you manually change?

vchirikov added a commit to vchirikov/elastic-helm-charts that referenced this issue Aug 27, 2023
vchirikov added a commit to vchirikov/elastic-helm-charts that referenced this issue Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants