Does Nomad has taint and toleration concept?

Hello,

Is it possible to put constraints at nomad client agent level. I don’t want to put any constraint in job manifest.

I want execute a job in specific machines with the help of constraints but, it is very difficult to convey the same to hundreds of employees.

Thank you

Hey @smartaquarius10

I think you’re looking at job affinities and constraints


Constraint will restrict the set of eligible nodes. This can be filtered on attributes or client metadata. Furthermore constraints can be done at the job, group or task level.

Affinity will attract workloads to a specific nodes based on criteria but will schedule them on other no eligible nodes if the affinity isn’t found.

Both K8s and Nomad require job level configuration to take advantage of taint/toleration and constraint/affinity

2 Likes

Thanks for sharing. But please correct me if I’m wrong here, consider if someone forgot to add these terminologies in their job file then there is a very high chance that jobs can also deploy on those specific machines.

In k8, if add a specific taint on node then it is mandatory to add tolerations on the pod otherwise pods will not deploy on tainted nodes at all.

Do we have anything like this so that if any employee do not add such tolerations constraints then still s/he can deploy the job but server will automatically deploy the task on non-tainted machines.

On gitter community, I also got a suggestion to make those 2 machines in other datacenter and other machines in one datacenter. But does that help because I have only one server node. And even after having 2 server nodes does this approach help because as far as I know, leader nomad node will automatically place the job process in any of the datacenter or please let me know if we have any option to set a default data center.