# Why can't OpenSearch accept K8S service for initial\_cluster\_manager\_nodes configuration?

**URL:** <https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695>\
**Category:** OpenSearch\
**Tags:** configure\
**Created:** [August 29, 2023, 8:28am UTC](https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695 "2023-08-29T08:28:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeongmin](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@jeongmin](https://forum.opensearch.org/u/jeongmin)\
**Post date:** [August 29, 2023, 8:28am UTC](https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695/1 "2023-08-29T08:28:42Z")

</div>

**Versions** : OpenSearch 2.8.0 and under.

Hi. I’m trying to setup OpenSearch cluster on Kubernetes.  
I use k8s headless service pointing the OpenSearch node pods for `cluster.initial_cluster_manager_nodes` but cluster bootstrapping failed with these logs:

```auto
[2023-08-22T17:44:13,959][INFO][o.o.c.c.ClusterBootstrapService] [os-test-cluster-manager-1] skipping cluster bootstrapping as local node does not match bootstrap requirements: [os-cluster-manager-discovery]

```

So, I looked over ClusterBootstrapService codes, and I found that there’s no DNS resolving for `initial_cluster_manager_nodes`.  
I got confused bc some configuration options, such as `discovery.seed_hosts`, has a resolver to get proper IP addresses from DNS, so k8s service names are allowed.

Why I can’t use service names for `initial_cluster_manager_nodes` configuration? Is there a reason not to use resolver?

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [August 29, 2023, 12:49pm UTC](https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695/2 "2023-08-29T12:49:16Z")

</div>

@jeongmin Could you share your values.yml file?  
Have you tried `os-cluster-manager-discovery.default.svc` instead?

---

<div class="post-metadata">

**Author:** ![jeongmin](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@jeongmin](https://forum.opensearch.org/u/jeongmin)\
**Post date:** [September 11, 2023, 6:13am UTC](https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695/3 "2023-09-11T06:13:52Z")

</div>

@pablo Sorry for the late reply.  
I’ve tested your suggestion but cluster manager discovery failed again.  
`[2023-09-11T14:59:13,845][INFO][o.o.c.c.ClusterBootstrapService] [os-test-project-cluster-manager-0] skipping cluster bootstrapping as local node does not match bootstrap requirements: [os-test-project-cluster-manager-discovery.opensearchoperatore2e-createopensearchcluster.svc]`

I’m distributing OS clusters via self-made operator, so there’s no values.yaml or helm chart stuff.

I made statefulset with templates and all the OpenSearch configuration options are passed by container env variables.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/8/8ba16c90cf153e6bd98f901e6a6d53aa11bd3ac3.png)

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [October 27, 2023, 2:08pm UTC](https://forum.opensearch.org/t/why-cant-opensearch-accept-k8s-service-for-initial-cluster-manager-nodes-configuration/15695/4 "2023-10-27T14:08:23Z")

</div>

@jeongmin I had a look at the OpenSearch cluster deployed with OpenSearch helm charts.  
The deployed OpenSearch nodes have cluster.initial\_cluster\_manager\_nodes set to pod names in the env variables.

Charts use a script in the helper to extract the pod name for this option.  
Only the `discovery.seed_hosts` option is set to a service called \<chart\_name\>-cluster-master-headless.

I think you need to do the same in your custom deployment.
