<p>I spent some time looking into how to pass the parameters to helm in order to configure the <code>nodeSelector</code> properly.</p>

<p>Different tries led to different errors like:</p>

<pre><code>Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.nodeSelector.kubernetes): invalid type for io.k8s.api.core.v1.PodSpec.nodeSelector: got "map", expected "string"
</code></pre>

<pre><code>coalesce.go:196: warning: cannot overwrite table with non table for nodeSelector (map[])
</code></pre>

<p>Reference: <a href="https://learn.microsoft.com/en-us/azure/aks/ingress-static-ip" rel="noreferrer">https://learn.microsoft.com/en-us/azure/aks/ingress-static-ip</a></p>

<p>In the link above, we can see how it should be used: </p>

<pre><code>helm install nginx-ingress stable/nginx-ingress \
    --namespace $NAMESPACE \
    --set controller.replicaCount=1 \
    --set controller.nodeSelector."kubernetes\.io/hostname"=$LOADBALANCER_NODE \
    --set controller.service.loadBalancerIP="$LOADBALANCER_IP" \
    --set controller.extraArgs.default-ssl-certificate="$NAMESPACE/$LOADBALANCER_NODE-ssl"
</code></pre>

<p>In general it is a good source to look into helm help: <a href="https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set" rel="noreferrer">https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set</a></p>

<p>Here you can find all the nginx parameters: <a href="https://github.com/helm/charts/tree/master/stable/nginx-ingress" rel="noreferrer">https://github.com/helm/charts/tree/master/stable/nginx-ingress</a></p>
