Alessandro Borraccino:
Hi everyone! I was trying to create a job setting the property activeDeadlineSeconds: 30
in order to automatically terminate the job after 30sec but it continues to running anyway. What am I missing from here?
1 apiVersion: batch/v1
2 kind: Job
3 metadata:
4 creationTimestamp: null
5 name: myjob
6 spec:
7 activeDeadlineSeconds: 30
8 template:
9 metadata:
10 creationTimestamp: null
11 spec:
12 containers:
13 - command:
14 - /bin/sh
15 - -c
16 - while true; do echo hello world; sleep 10; done
17 image: busybox
18 name: myjob
19 resources: {}
20 restartPolicy: Never
21 status: {}
~
If I want to check the job I see is running even after 30sec:
controlplane $ k get jobs.batch -w
NAME COMPLETIONS DURATION AGE
myjob 0/1 4m43s 4m43s