You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For information about writing a Job `.spec`, see [Writing a Job Spec](/docs/concepts/workloads/controllers/job/#writing-a-job-spec).
103
103
104
-
### Deadline for delayed job start {#starting-deadline}
104
+
### Deadline for delayed Job start {#starting-deadline}
105
105
106
106
The `.spec.startingDeadlineSeconds` field is optional.
107
107
This field defines a deadline (in whole seconds) for starting the Job, if that Job misses its scheduled time
108
108
for any reason.
109
109
110
110
After missing the deadline, the CronJob skips that instance of the Job (future occurrences are still scheduled).
111
-
For example, if you have a backup job that runs twice a day, you might allow it to start up to 8 hours late,
111
+
For example, if you have a backup Job that runs twice a day, you might allow it to start up to 8 hours late,
112
112
but no later, because a backup taken any later wouldn't be useful: you would instead prefer to wait for
113
113
the next scheduled run.
114
114
115
115
For Jobs that miss their configured deadline, Kubernetes treats them as failed Jobs.
116
116
If you don't specify `startingDeadlineSeconds` for a CronJob, the Job occurrences have no deadline.
117
117
118
118
If the `.spec.startingDeadlineSeconds` field is set (not null), the CronJob
119
-
controller measures the time between when a job is expected to be created and
119
+
controller measures the time between when a Job is expected to be created and
120
120
now. If the difference is higher than that limit, it will skip this execution.
121
121
122
-
For example, if it is set to `200`, it allows a job to be created for up to 200
122
+
For example, if it is set to `200`, it allows a Job to be created for up to 200
123
123
seconds after the actual schedule.
124
124
125
125
### Concurrency policy
126
126
127
127
The `.spec.concurrencyPolicy` field is also optional.
128
-
It specifies how to treat concurrent executions of a job that is created by this CronJob.
128
+
It specifies how to treat concurrent executions of a Job that is created by this CronJob.
129
129
The spec may specify only one of the following concurrency policies:
130
130
131
-
*`Allow` (default): The CronJob allows concurrently running jobs
132
-
*`Forbid`: The CronJob does not allow concurrent runs; if it is time for a new job run and the
133
-
previous job run hasn't finished yet, the CronJob skips the new job run
134
-
*`Replace`: If it is time for a new job run and the previous job run hasn't finished yet, the
135
-
CronJob replaces the currently running job run with a new job run
131
+
*`Allow` (default): The CronJob allows concurrently running Jobs
132
+
*`Forbid`: The CronJob does not allow concurrent runs; if it is time for a new Job run and the
133
+
previous Job run hasn't finished yet, the CronJob skips the new Job run. Also note that when the
134
+
previous Job run finishes, `.spec.startingDeadlineSeconds` is still taken into account and may
135
+
result in a new Job run.
136
+
*`Replace`: If it is time for a new Job run and the previous Job run hasn't finished yet, the
137
+
CronJob replaces the currently running Job run with a new Job run
136
138
137
-
Note that concurrency policy only applies to the jobs created by the same cron job.
138
-
If there are multiple CronJobs, their respective jobs are always allowed to run concurrently.
139
+
Note that concurrency policy only applies to the Jobs created by the same CronJob.
140
+
If there are multiple CronJobs, their respective Jobs are always allowed to run concurrently.
139
141
140
142
### Schedule suspension
141
143
@@ -149,19 +151,19 @@ scheduled, but the CronJob controller does not start the Jobs to run the tasks)
149
151
you unsuspend the CronJob.
150
152
151
153
{{< caution >}}
152
-
Executions that are suspended during their scheduled time count as missed jobs.
154
+
Executions that are suspended during their scheduled time count as missed Jobs.
153
155
When `.spec.suspend` changes from `true` to `false` on an existing CronJob without a
154
-
[starting deadline](#starting-deadline), the missed jobs are scheduled immediately.
156
+
[starting deadline](#starting-deadline), the missed Jobs are scheduled immediately.
155
157
{{< /caution >}}
156
158
157
159
### Jobs history limits
158
160
159
161
The `.spec.successfulJobsHistoryLimit` and `.spec.failedJobsHistoryLimit` fields are optional.
160
-
These fields specify how many completed and failed jobs should be kept.
162
+
These fields specify how many completed and failed Jobs should be kept.
161
163
By default, they are set to 3 and 1 respectively. Setting a limit to `0` corresponds to keeping
162
-
none of the corresponding kind of jobs after they finish.
164
+
none of the corresponding kind of Jobs after they finish.
163
165
164
-
For another way to clean up jobs automatically, see [Clean up finished jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically).
166
+
For another way to clean up Jobs automatically, see [Clean up finished Jobs automatically](/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically).
165
167
166
168
### Time zones
167
169
@@ -207,27 +209,27 @@ Kubernetes tries to avoid those situations, but does not completely prevent them
207
209
the Jobs that you define should be _idempotent_.
208
210
209
211
If `startingDeadlineSeconds` is set to a large value or left unset (the default)
210
-
and if `concurrencyPolicy` is set to `Allow`, the jobs will always run
212
+
and if `concurrencyPolicy` is set to `Allow`, the Jobs will always run
211
213
at least once.
212
214
213
215
{{< caution >}}
214
216
If `startingDeadlineSeconds` is set to a value less than 10 seconds, the CronJob may not be scheduled. This is because the CronJob controller checks things every 10 seconds.
215
217
{{< /caution >}}
216
218
217
219
218
-
For every CronJob, the CronJob {{< glossary_tooltip term_id="controller" >}} checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the job and logs the error.
220
+
For every CronJob, the CronJob {{< glossary_tooltip term_id="controller" >}} checks how many schedules it missed in the duration from its last scheduled time until now. If there are more than 100 missed schedules, then it does not start the Job and logs the error.
219
221
220
222
```
221
223
Cannot determine if job needs to be started. Too many missed start time (> 100). Set or decrease .spec.startingDeadlineSeconds or check clock skew.
222
224
```
223
225
224
-
It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed jobs occurred in the last 200 seconds.
226
+
It is important to note that if the `startingDeadlineSeconds` field is set (not `nil`), the controller counts how many missed Jobs occurred from the value of `startingDeadlineSeconds` until now rather than from the last scheduled time until now. For example, if `startingDeadlineSeconds` is `200`, the controller counts how many missed Jobs occurred in the last 200 seconds.
225
227
226
228
A CronJob is counted as missed if it has failed to be created at its scheduled time. For example, if `concurrencyPolicy` is set to `Forbid` and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed.
227
229
228
230
For example, suppose a CronJob is set to schedule a new Job every one minute beginning at `08:30:00`, and its
229
231
`startingDeadlineSeconds` field is not set. If the CronJob controller happens to
230
-
be down from `08:29:00` to `10:21:00`, the job will not start as the number of missed jobs which missed their schedule is greater than 100.
232
+
be down from `08:29:00` to `10:21:00`, the Job will not start as the number of missed Jobs which missed their schedule is greater than 100.
231
233
232
234
To illustrate this concept further, suppose a CronJob is set to schedule a new Job every one minute beginning at `08:30:00`, and its
233
235
`startingDeadlineSeconds` is set to 200 seconds. If the CronJob controller happens to
Copy file name to clipboardExpand all lines: content/en/docs/contribute/style/style-guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,7 @@ Run the process as a DaemonSet in the `kube-system` namespace. | Run the process
156
156
{{< table caption = "Do and Don't - Use code style for Kubernetes command tool and component names" >}}
157
157
Do | Don't
158
158
:--| :-----
159
-
The kubelet preserves node stability. | The `kubelet` preserves node stability.
159
+
The `kubelet` preserves node stability. | The kubelet preserves node stability.
160
160
The `kubectl` handles locating and authenticating to the API server. | The kubectl handles locating and authenticating to the apiserver.
161
161
Run the process with the certificate, `kube-apiserver --client-ca-file=FILENAME`. | Run the process with the certificate, kube-apiserver --client-ca-file=FILENAME. |
Copy file name to clipboardExpand all lines: content/en/docs/reference/using-api/deprecation-guide.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,11 @@ The **flowcontrol.apiserver.k8s.io/v1beta3** API version of FlowSchema and Prior
35
35
36
36
### v1.29
37
37
38
-
The **v1.29** release will stop serving the following deprecated API versions:
38
+
The **v1.29** release stopped serving the following deprecated API versions:
39
39
40
40
#### Flow control resources {#flowcontrol-resources-v129}
41
41
42
-
The **flowcontrol.apiserver.k8s.io/v1beta2** API version of FlowSchema and PriorityLevelConfiguration will no longer be served in v1.29.
42
+
The **flowcontrol.apiserver.k8s.io/v1beta2** API version of FlowSchema and PriorityLevelConfiguration is no longer served as of v1.29.
43
43
44
44
* Migrate manifests and API clients to use the **flowcontrol.apiserver.k8s.io/v1** API version, available since v1.29, or the **flowcontrol.apiserver.k8s.io/v1beta3** API version, available since v1.26.
45
45
* All existing persisted objects are accessible via the new API
@@ -54,7 +54,7 @@ The **v1.27** release stopped serving the following deprecated API versions:
If `<data-dir-location>` is the same folder as before, delete it and stop etcd process before restoring the cluster. Else change etcd configuration and restart the etcd process after restoration to make it use the new data directory.
362
+
367
363
For more information and examples on restoring a cluster from a snapshot file, see
0 commit comments