liveBook · Manning

Parallelism field

As explained in Kubernetes for Developers

Parallelism is a Kubernetes Job setting that specifies how many Pod instances may run concurrently.

The parallelism field sets how many Pods a Kubernetes Job may run at the same time. It provides Job workers with concurrent capacity, much like replicas do for a Deployment. After the Job completes, it cannot be scaled back up; delete and recreate it to process a new queue. section 10.3.1

Two workers for a queue

A Job with parallelism: 2 starts two worker Pods concurrently. In the queue-processing example, both Pods consume Redis tasks, then terminate after the queue is empty. Job status reports this as 0/1 of 2 while both workers run and shows both Pods Completed afterward. section 10.3.1

How Kubernetes for Developers covers it

How deep it goes
Defines concurrency and demonstrates running and completed Pods, but stops short of internal scheduling behavior.
Examples
Uses a Redis task queue and a Job manifest configured with parallelism: 2.
What it assumes
Assumes basic familiarity with Kubernetes Jobs, Pods, Deployments, and containerized workers.
What you can do after
Apply it via a Kubernetes Job manifest to run multiple queue workers concurrently and verify their status with kubectl.
How it connects
Connects Kubernetes Jobs with Deployments, Pods, Redis queues, restartPolicy, and Job completion.

Also explained in

Compare how 2 books explain parallelism field →

Related concepts

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