CronJobs and Jobs

CronJobs and Jobs aren’t in CKA, but are in CKAD

Challenge

Create a job called dicey using

  • image kodekloud/throw-dice

The image generates a random number between 1 and 6 and exits. It is a success only if it is a 6 else it is a failure. Check how many times it takes the job to trigger to get a successful outcome.


Expand here to see the solution

Challenge

Create a job with the above image to

  • generate 8 successful outcomes.
  • attempts no more than 15 attempts
  • 3 parallel executions.

Expand here to see the solution

Challenge

Create a Cronjob called echo-me using

  • image busybox
  • command date; echo hello from kubernetes cluster
  • schedule for every 2mins

Expand here to see the solution