ActiveDeadlineSeconds or StartingDeadlineSeconds

I got the below questions in one of the practice questions.

Create a YAML formatted Kubernetes manifest /opt/KDPD00301/periodic.yaml that runs the following shell command: date in a single busybox container. The command should run every minute and must complete within 22 seconds or be terminated oy Kubernetes.

Here it is mentioned “It must be completed within 22 seconds”, I think it should be activeDeadlineSeconds for the cronjob but in the answer it is mentioned startingDeadlineSeconds. Can someone please confirm this.

Hello @kodecloud2295,

Can you post the periodic.yaml file and also the full question?

job.spec.activeDeadlineSeconds
Specifies the duration in seconds relative to the startTime that the job
may be continuously active before the system tries to terminate it; value
must be positive integer. If a Job is suspended (at creation or through an
update), this timer will effectively be stopped and reset when the Job is
resumed again.
cronjob.spec.startingDeadlineSeconds
Optional deadline in seconds for starting the job if it misses scheduled
time for any reason. Missed jobs executions will be counted as failed ones.

Thanks,
Trung.

1 Like

Hi @kodecloud2295,
Can you please tell me where did you get this question?

Regards,

Please don’t discuss the official k8s exam question. It’s against the NDA.

2 Likes