Can I deploy a container to every node with specific tag

I want to deploy a container to every node which has a specific tag (using constraint etc). Is it possible? In this case containers count becomes irrelevent

I think, you can add client specific meta and then use that for job/group/task constraints.

and

You can easily redesign “tags” of cloud resources down into client specific “meta” information.

On the same note, in case you want to seed the Consul Agent (I am assuming you have Consul as well :wink:) with some metadata, you can reference the Consul metadata using the template stanza:

I have tried using Meta tags, and it works but Nomad deploys the number of containers based on the Count I define in job file. My objective is to deploy “a container” on every node having the specific meta tag. Number of nodes can be N, N-1, N+1 (basically count may change at runtime based on how my Consul/Nomad cluster is scaled).

Off the top of my head, the spread stanza might help.
Another hack that I have seen is to use a static port so no two allocations land on the same machine.

Spread won’t help as it still works based on Count value. My objective is to deploy my sidecar on each node that matches a specific meta(or criteria). Number of nodes are dynamic(means no fixed Count) and have Nomad Client installed on them, so Nomad is aware of those nodes.

have you tried a simple system job with constraints ?

system worked! Thanks a lot for your help!