Define the pod manifest run command uname in a single busybox:stable container. . . .

Soufiane Aqajjef:
define the pod manifest run command uname in a single busybox:stable container. the command must run evry minute abd must complete within 22 seconds or be terminated by kubernetes. the cronjob name and container name must both be hello

Oliver Radwell:
this may help: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
22 second deadline can be achieved with activeDeadlineSeconds
https://kubernetes.io/docs/concepts/workloads/controllers/job/

Tanumoy Ghosh:

  1. Creating cronjob via imperative way
    kubectl create cj hello --image busybox:stable --schedule "*/1 * * * *" --dry-run=client -o yaml -- /bin/sh -c 'uname' > hello-cj.yaml

  2. Open hello-cj.yaml in vi editor to include activeDeadlineSeconds: 22 in job spec

  3. kubectl create -f hello-cj.yaml

Soufiane Aqajjef:
thanks