How the value of nodeSelector is decided

nodeSelector:
kubernetes.io/hostname: master
tolerations:

Example from EKS:

In the user data append to /etc/eks/bootstrap.sh --node-labels=role=worker,anotherlabel=anothervalue

Then you can set the nodeSelector for the pod.

nodeSelector:
  role: worker

You should not use master nodes for scheduling.