Skip to content

Jobs: Batch Processing

A Job creates one or more Pods and ensures that a specified number of them successfully terminate.


apiVersion: batch/v1
kind: Job
metadata:
name: database-migration
spec:
backoffLimit: 4
completions: 1
template:
spec:
restartPolicy: OnFailure
containers:
- name: migration-worker
image: mycompany/db-migration:v1.2
command: ["python", "manage.py", "migrate"]