I'm trying to install aws-load-balancer-controller in my EKS cluster using terraform (resource "helm_release" "aws_load_balancer_controller").
I want the pod (pod/aws-load-balancer-controller-555d8dcf46-zz6tn) created in this process should be scheduled inside specific node.
I know that nodeSelector and nodeAffinity can be easily used, but I'm using terraform to create resources and not getting option to do so.
Any help would be appreciated.
In order to define the
nodeSelectororaffinityyou have to use thevaluesoption [1] for thehelm_release. So, in your case that would be something like:Then, you would have to create a
values.yamlfile in the same directory:where the
<label_key>and<label_value>is the label key value pair for the Node you wish to run the Pod on.[1] https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#values