Course contentsShow
← Cloud and Infrastructure
Lesson 1192 of 2,98923. Kubernetes WorkloadsFree lesson

Job Completion Modes and Parallelism

Learn completion count, parallelism settings, and how to run multiple pods in parallel or sequentially for batch processing.

Job Completion Modes and Parallelism

You'll learn how to control how many times a Job runs and whether those runs happen in parallel or one-at-a-time.

The Core Idea

When you create a Kubernetes Job, you can configure two important behaviors:

  1. Completion count — how many successful pod completions you need
  2. Parallelism — how many pods can run at the same time

Think of it like a restaurant kitchen: completion count is how many dishes you need to prepare, and parallelism is how many chefs can work simultaneously.

Completion Count

The .spec.completions field tells Kubernetes how many times your Job must successfully complete. If you set completions: 5, the Job will keep creating pods until five have finished successfully.

Without this field, the Job runs once and considers itself complete.

Parallelism

The .spec.parallelism field controls how many pods run concurrently:

  • parallelism: 1 — sequential processing (one pod at a time)
  • parallelism: 3 — up to three pods run simultaneously
  • parallelism: 0 — pauses the Job (no pods run)

If you omit this field, Kubernetes defaults to running one pod at a time.

How They Work Together

Combine both settings for powerful batch processing:

  • completions: 10, parallelism: 2 — Run 10 tasks total, two at a time
  • completions: 100, parallelism: 10 — Process 100 items using 10 parallel workers

Kubernetes automatically creates new pods as old ones complete, maintaining your desired parallelism level until reaching the completion count.

Practical Use

This is ideal for batch jobs like image processing, data transformation, or report generation where you want to process multiple items efficiently without overwhelming your cluster.

Key Takeaway: Use completions to set how many successful runs you need, and parallelism to control how many pods work simultaneously—balancing speed against resource consumption.