# ⏳ Kubernetes Jobs A **Job** in Kubernetes runs a pod to completion. It ensures that a specified number of pods successfully terminate. Use Jobs for **batch processing**, **one-off tasks**, or **short-lived workloads**. --- ## πŸ” Job Commands ### πŸ“„ List Jobs in a Namespace ```bash kubectl get jobs.batch -n ```` ### ❌ Delete a Job ```bash kubectl delete jobs.batch -n ``` --- ## 🧾 Example Job Manifest Here’s a minimal example of a Job that runs a simple `echo` command: ```yaml apiVersion: batch/v1 kind: Job metadata: name: myjob namespace: ns spec: template: spec: containers: - name: job1 image: alpine command: - echo - "hello world" restartPolicy: Never ``` > πŸ’‘ **Note:** Always set `restartPolicy` to `Never` or `OnFailure` for jobs. > πŸ“Œ Jobs are useful for tasks like backups, report generation, or database migrations.