Skip to content

Commit 8ec205f

Browse files
soltyshsteveperry-53
authored andcommitted
Update docs to use batch/v1beta1 cronjobs (#5475)
1 parent bccd651 commit 8ec205f

File tree

6 files changed

+9
-60
lines changed

6 files changed

+9
-60
lines changed

cn/docs/concepts/workloads/controllers/cronjob.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/concepts/jobs/cronjob.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/concepts/workloads/controllers/cron-jobs.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) forma
2222
**Note:** The question mark (`?`) in the schedule has the same meaning as an asterisk `*`,
2323
that is, it stands for any of available value for a given field.
2424

25-
**Note:** ScheduledJob resource was introduced in Kubernetes version 1.4, but starting
26-
from version 1.5 its current name is CronJob.
25+
**Note:** CronJob resource in `batch/v2alpha1` API group has been deprecated starting
26+
from cluster version 1.8. You should switch to using `batch/v1beta1`, instead, which is
27+
enabled by default in the API server. Further in this document, we will be using
28+
`batch/v1beta1` in all the examples.
2729

2830
A typical use case is:
2931

@@ -32,8 +34,8 @@ A typical use case is:
3234

3335
### Prerequisites
3436

35-
You need a working Kubernetes cluster at version >= 1.4 (for ScheduledJob), >= 1.5 (for CronJob),
36-
with batch/v2alpha1 API turned on by passing `--runtime-config=batch/v2alpha1=true` while bringing up
37+
You need a working Kubernetes cluster at version >= 1.8 (for CronJob). For previous versions of cluster (< 1.8)
38+
you need to explicitly enable `batch/v2alpha1` API by passing `--runtime-config=batch/v2alpha1=true` to
3739
the API server (see [Turn on or off an API version for your cluster](/docs/admin/cluster-management/#turn-on-or-off-an-api-version-for-your-cluster)
3840
for more).
3941

docs/concepts/workloads/controllers/cronjob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: batch/v2alpha1
1+
apiVersion: batch/v1beta1
22
kind: CronJob
33
metadata:
44
name: hello

docs/user-guide/cronjob.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/user-guide/kubectl-conventions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ In order for `kubectl run` to satisfy infrastructure as code:
3838
* Deployment, using `extensions/v1beta1` endpoint - use `deployment/v1beta1` (default).
3939
* Deployment, using `apps/v1beta1` endpoint - use `deployment/apps.v1beta1` (recommended).
4040
* Job - use `job/v1`.
41-
* CronJob - use `cronjob/v2alpha1`.
41+
* CronJob - using `batch/v1beta1` endpoint - use `cronjob/v1beta1`(default).
42+
* CronJob - using `batch/v2alpha1` endpoint - use `cronjob/v2alpha1` (deprecated).
4243

4344
Additionally, if you didn't specify a generator flag, other flags will suggest using
4445
a specific generator. Below table shows which flags force using specific generators,

0 commit comments

Comments
 (0)