Helm Chart: Cluster name anything apart from "opensearch-cluster" is not working

I tried deploying OpenSearch using the helm chart, it’s working fine when the cluster name is set to default opesearch-cluster, but when it’s set to something custom, it’s throwing error -
OpenSearch Security not initialized

Values which resulting error -

clusterName: "foobar-cluster"
nodeGroup: "master"
masterService: "foobar-master"
config:
  opensearch.yml:
    cluster.name: foobar-cluster

Working Values

clusterName: "opensearch-cluster"
nodeGroup: "master"
masterService: "opensearch-cluster-master"
config:
  opensearch.yml:
    cluster.name: opensearch-cluster

Anyone, any idea ? do we need to update nay other values as well if we want to use custom cluster name ?

@TheAlgo Do you have any thoughts on this?

1 Like

Did you try making the masterService as foobar-cluster-master?
Ref : https://github.com/opensearch-project/opensearch-devops/blob/main/Helm/opensearch/values.yaml#L6

Also @jasodeep I assume this is the same issue you are facing here. I was able to spin up a cluster with a custom name. Only change which is required is in clusterName and cluster.name.

1 Like

@TheAlgo yes, this is the same issue as you mentioned. It seems working for you so I’ll revisit the configurations.

1 Like

@TheAlgo Issue is resolved now.

Actually I was trying form a opensearch cluster, so I had multiple node groups e.g. master, data. And elasticsearch need at least one master eligible node to bootstrap the cluster and that was misconfigured so while I was deploying other node groups it was failing to identify the master node and was leading to the mentioned issue.

1 Like