# Proper syntax for nodeSelector values in apps launch?

**URL:** <https://forums.suse.com/t/proper-syntax-for-nodeselector-values-in-apps-launch/16800>\
**Category:** SUSE Rancher Prime\
**Created:** [March 9, 2020, 8:12pm UTC](https://forums.suse.com/t/proper-syntax-for-nodeselector-values-in-apps-launch/16800 "2020-03-09T20:12:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Petersen](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/daniel_petersen/32/4211_2.png) [@Daniel\_Petersen](https://forums.suse.com/u/Daniel_Petersen)\
**Post date:** [March 9, 2020, 8:12pm UTC](https://forums.suse.com/t/proper-syntax-for-nodeselector-values-in-apps-launch/16800/1 "2020-03-09T20:12:54Z")

</div>

Hello,  
I’m launching the ‘elasticsearch’ app from the helm catalog onto a cluster and would like to constrain which nodes it runs on. Under “Detailed Descriptions” it mentions these Configuration parameters:  
client.nodeSelector {}  
master.nodeSelector {}  
data.nodeSelector {}

Based on the Rancher docs [here](https://rancher.com/docs/rancher/v2.x/en/catalog/#launching-catalog-applications), the values should adhere to the format allowed by helm --set argument.  
So if I want to constrain the pods to, say nodes with the “env=dev” key/pair, I would add:

{“env”:“dev”}

But this fails with:  
v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.NodeSelector: ReadMapCB: expect { or n, but found [, error found in #10 byte of …|elector":["“env”:|…, bigger context …|ityContext":{“privileged”:true}}],“nodeSelector”:["“env”:“dev”"],“restartPolicy”:“Always”,"sched|…

…what is the proper syntax for values of type {} ?

---

<div class="post-metadata">

**Author:** ![Daniel\_Petersen](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/daniel_petersen/32/4211_2.png) [@Daniel\_Petersen](https://forums.suse.com/u/Daniel_Petersen)\
**Post date:** [March 11, 2020, 4:52pm UTC](https://forums.suse.com/t/proper-syntax-for-nodeselector-values-in-apps-launch/16800/2 "2020-03-11T16:52:42Z")

</div>

Looks like this is a compatibility problem with the chart version Rancher is trying to deploy, and Kubernetes 1.17.3.

I ended up installing elasticsearch from here:

> **[elastic/helm-charts](https://github.com/elastic/helm-charts)**
>
> You know, for Kubernetes. Contribute to elastic/helm-charts development by creating an account on GitHub.

Quick and easy, able to setup node affinity without any problem.
