[Verse 1]
When you need a task to run just once and then be done
Kubernetes has jobs that get the work complete
Unlike pods that keep on running till their time has come
Jobs will finish up and mark success so neat
Create a job with kubectl, give it name and image too
Add a dash dash for the command you want to run
The container starts up working on the task for you
When it's finished, job is marked as done
[Chorus]
Jobs run to completion, that's their special way
Create, get, and logs - remember these three
Kubectl create job with image every day
Get jobs shows the status, logs show what you see
Run to completion, then they're done hooray
Jobs make sure your one-time tasks run perfectly
[Verse 2]
Once you've got your job created, how do you check its state?
Kubectl get jobs will show you what's going on
See if it's still running or if it had to wait
Completed column tells you when the work is done
But what if something goes wrong and you need to see inside?
Kubectl logs job slash name will show the way
All the output from your container, nothing left to hide
Debug problems from your job throughout the day
[Chorus]
Jobs run to completion, that's their special way
Create, get, and logs - remember these three
Kubectl create job with image every day
Get jobs shows the status, logs show what you see
Run to completion, then they're done hooray
Jobs make sure your one-time tasks run perfectly
[Bridge]
Different from deployments that keep pods alive
Jobs are meant for one-time tasks that finish and survive
Database migrations, batch processing too
Any task that runs once, jobs are perfect for you
[Chorus]
Jobs run to completion, that's their special way
Create, get, and logs - remember these three
Kubectl create job with image every day
Get jobs shows the status, logs show what you see
Run to completion, then they're done hooray
Jobs make sure your one-time tasks run perfectly
[Outro]
So when you need a task to run and finish clean
Jobs in Kubernetes are the way to go
Create, get, and logs - the best commands you've seen
For one-time tasks that complete and show