File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
content/en/docs/concepts/workloads/controllers Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -510,8 +510,8 @@ When a Job is resumed from suspension, its `.status.startTime` field will be
510
510
reset to the current time. This means that the `.spec.activeDeadlineSeconds`
511
511
timer will be stopped and reset when a Job is suspended and resumed.
512
512
513
- Remember that suspending a Job will delete all active Pods. When the Job is
514
- suspended, your [Pods will be terminated](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
513
+ Remember that suspending a Job will delete all Pods that are not Completed . When the Job is
514
+ suspended, Non-Completed [Pods will be terminated](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
515
515
with a SIGTERM signal. The Pod's graceful termination period will be honored and
516
516
your Pod must handle this signal in this period. This may involve saving
517
517
progress for later or undoing changes. Pods terminated this way will not count
@@ -537,6 +537,18 @@ spec:
537
537
...
538
538
` ` `
539
539
540
+ Alternatively, a job suspension can be toggled from the command line by patching the job resource. Suspend an active job :
541
+
542
+ ` ` ` shell
543
+ kubectl patch job/myjob -p '{"spec":{"suspend":true}}'
544
+ ` ` `
545
+
546
+ Unsuspend an active job :
547
+
548
+ ` ` ` shell
549
+ kubectl patch job/myjob -p '{"spec":{"suspend":false}}'
550
+ ` ` `
551
+
540
552
The Job's status can be used to determine if a Job is suspended or has been
541
553
suspended in the past :
542
554
You can’t perform that action at this time.
0 commit comments