liveBook · Manning

Nomad group

As explained in Road to Kubernetes

A Nomad group is a workload-definition unit within a Nomad job that contains tasks and controls their instance count and shared settings.

A Nomad group organizes related tasks inside a job. A job can contain many groups, and each group can contain many tasks or containers. Group-level settings coordinate those tasks, including instance count and network ports. section 9.2.5

One group, two application containers

The web job places Python and Node.js tasks in an apps group. Setting count = 1 requests one group instance, while group-level network mappings expose the applications on ports 8080 and 3000. section 9.2.5

Listing 9.8 Nomad job definition
job "a_unique_job_name" {
  group "unique_group_per_job" {
    task "unique_task_per_group" {
      driver = "docker"
      config {
        image = "codingforentrepreneurs/rk8s-py"
      }
    }
  }
}

Use the minimal HCL definition to see the nesting from job to group to Docker task. section 9.2.5

How Road to Kubernetes covers it

How deep it goes
Explains nesting, task membership, instance count, networking, and services, but defers broader Nomad UI details.
Examples
Uses a web group containing Python and Node.js containers, count configuration, port mappings, and service declarations.
What it assumes
Assumes basic HCL and container concepts while introducing Nomad's job-group-task hierarchy through runnable examples.
What you can do after
Build it from scratch by writing HCL that groups tasks, sets instance count, maps ports, and registers services.
How it connects
Connects Nomad jobs with tasks, containers, Docker runtime, network port mapping, and service definitions.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.