Good Morning,
Hope you are doing well.
I’m trying to use node affinity to deploy jobs on specific nodes.
I have 2 agents nodes, qual-nomad-agent-01 and qual-nomad-agent-02.
When i set this configuration on my job, it keeps deploying on node qual-nomad-agent-02.
affinity {
attribute = "${node.name}"
value = "qual-nomad-agent-01"
weight = 100
}
Even if i set a wrong node name, it keeps deploying on qual-nomad-agent-02
affinity {
attribute = "${node.name}"
value = "qual-"
weight = 100
}
When i try to set constraints, i get some errors.
constraint {
attribute = "${node.name}"
operator = "="
value = "qual-nomad-agent-01"
}
Error
I don’t want my jobs to be deployed randomly on servers.
Can you please help on this subject?