5 ms·
> - Job: Job is a collection of different groups. Job is where the constraints for type of scheduler, update strategies and ACL is placed. > - Group: Group is
by OJFord 6y ago
> - Job: Job is a collection of different groups. Job is where the constraints for type of scheduler, update strategies and ACL is placed.
> - Group: Group is a collection of different tasks. A group is always executed on the same Nomad client node. You'll want to use Groups for use-cases like a logging sidecar, reverse proxies etc.
> - Task: Atomic unit of work. A task in Nomad can be running a container/binary/Java VM etc, defining the mount points, env variables, ports to be exposed etc.
> If you're coming from K8s you can think of Task as a Pod and Group as a Replicaset. There's no equivalent to Job in K8s.
Is that right? I haven't used Nomad (yet?) but, as described, it sounds to me more like Job ~= Deployment; Group ~= Pod; Task ~= Container?
- ddreier 6y agoI think your description is more accurate. A Task is an individual unit of work: a container, executable, JVM app, etc. A Task Group/Allocation is a group of Tasks that will be placed together on nodes as a unit. A Job is a collection of Task Groups and is where you tell Nomad how to schedule the work. A "system" Job is scheduled across all Nodes somewhat like a DaemonSet. A "batch" Job can be submitted as a one-off execution, periodic (run on a schedule) or parameterized (run on demand with variables specified at runtime). A "service" Job is the "normal" scheduler where all Task Groups are treated like ReplicaSets. Placement is determined by constraints that can be specified on each Task Group.
- mr-karan 6y agoAuthor here. Hm, now that you point this out, I do get your point. However you can't run multiple different Pods in a deployment (you can run multiple containers in a Pod), that's why a Job isn't really comparable to a ReplicaSet. I could very well be wrong, but this is my understanding.
- alexeldeib 6y agoI think the tricky part is Nomad merges replica count + definition into Group, while K8s separates Pod/RS/Deployment (and uses RS to orchestrate upgrades, which I think Nomad handles on its own somehow?). Job ~= Deployment Group ~= Replicaset/Pod combined Task ~= container in pod