Skip to content

Latest commit

 

History

History

Ch04

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Chapter 4: Design

Documentation

Go to kubernetes.io -> Tasks -> Run Jobs -> Running Automated Tasks with a CronJob

Create a job

kubectl run sleepy --image=busybox --restart=OnFailure --dry-run=true -o yaml -- /bin/sleep 3
# Or
kubectl create job sleepy --image=busybox --dry-run=true -o yaml -- /bin/sleep 3

Completion, Parallelism & Active Deadline

Edit the job manifest to include job.spec.completion, job.spec.parallelism and job.spec.activeDeadlineSeconds. Example:

spec:
  completions: 5
  parallelism: 2
  activeDeadlineSeconds: 15
  template:
    spec:

Create a cronjob

kubectl run sleepy --image=busybox --schedule="*/2 * * * *" --restart=OnFailure --dry-run=true -o yaml -- /bin/sleep 3

Notes from the Training

  • Ambassador is an "open source, Kubernetes-native API gateway for microservices built on Enjoy"