# How to pass NodeSelector in the elasticsearch helm chart?

**URL:** <https://discuss.elastic.co/t/how-to-pass-nodeselector-in-the-elasticsearch-helm-chart/342619>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [September 8, 2023, 3:05pm UTC](https://discuss.elastic.co/t/how-to-pass-nodeselector-in-the-elasticsearch-helm-chart/342619 "2023-09-08T15:05:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajat\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajat_agrawal/32/125460_2.png) [@Rajat\_Agrawal](https://discuss.elastic.co/u/Rajat_Agrawal)\
**Post date:** [September 8, 2023, 3:05pm UTC](https://discuss.elastic.co/t/how-to-pass-nodeselector-in-the-elasticsearch-helm-chart/342619/1 "2023-09-08T15:05:47Z")

</div>

I am trying to install elasticsearch in Kubernetes and I want to deploy the elasticsearch pod inside a particular node.

I am passing below config in yaml file -

```auto
elasticsearch:
  enabled: true
  replicas: 1
  minimumMasterNodes: 1
  fullnameOverride: "elasticsearch"
  imagePullPolicy: "Always"
  esJavaOpts: "-Xmx1024m -Xms1024m"
  maxUnavailable: 0
  clusterHealthCheckParams: "wait_for_status=yellow&timeout=20s"
  resources:
    requests:
      cpu: "100m"
      memory: "256M"
    limits:
      cpu: "2000m"
      memory: "2048M"
  nodeSelector:
    name: "appnode"

```

I am getting the error below -

```auto
Type Reason Age From Message
  ---- ------ ---- ---- -------
  Warning FailedScheduling 9m51s default-scheduler 0/2 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) had volume node affinity conflict. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
  Warning FailedScheduling 6m22s (x2 over 7m22s) default-scheduler 0/2 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) had volume node affinity conflict. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
  Normal NotTriggerScaleUp 4m44s (x30 over 9m45s) cluster-autoscaler pod didn't trigger scale-up: 1 node(s) didn't match Pod's node affinity/selector, 1 max node group size reached

```

Please help to resolve the issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 6, 2023, 3:06pm UTC](https://discuss.elastic.co/t/how-to-pass-nodeselector-in-the-elasticsearch-helm-chart/342619/2 "2023-10-06T15:06:34Z")

</div>

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