Appearance
Jobs
Use a Kubernetes Job to run a task that finishes, such as preparing data, setting up a model, running a migration, rendering files, or evaluating a model. The job starts pods to do the work and tracks whether it completes.
Create a job
- Open Kubernetes / Jobs.
- Select a namespace and open the create form.
- Enter a job name, select a plan, and choose a container image.
- Optionally enter a shell command, then create the job.
Use kubectl for settings the form does not include. These let you control parallel runs, retries, and the number of completions, or add labels, annotations, environment variables, storage, and multiple containers.
What to expect after creation
Open the job in the console to check its status and read its pod logs and events. The example prints run batch task and exits. To run the task again, create a job with a new name.
Troubleshooting
| Symptom | What to check |
|---|---|
kubectl apply is rejected | Check the job pod template's compute-plan label |
| Job is created but no pod runs | Inspect the job and pod events with kubectl describe job and kubectl describe pod |
| Job fails quickly | Review container logs with kubectl logs; also check the command, image, and required environment variables |
| Job retries more than expected | Check backoffLimit, restartPolicy, and pod exit codes |
| You need to run the work again | Create a new job name or apply a new manifest for the next run |
Read next
- Read CronJobs for scheduled batch work.
- Read Deployments for long-running services.
- Read Kubernetes overview to set up console or
kubectlaccess.