Skip to content

Commit

Permalink
Update docs to use batch/v1beta1 cronjobs (#5475)
Browse files Browse the repository at this point in the history
  • Loading branch information
soltysh authored and steveperry-53 committed Sep 19, 2017
1 parent bccd651 commit 8ec205f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 60 deletions.
18 changes: 0 additions & 18 deletions cn/docs/concepts/workloads/controllers/cronjob.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions docs/concepts/jobs/cronjob.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions docs/concepts/workloads/controllers/cron-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) forma
**Note:** The question mark (`?`) in the schedule has the same meaning as an asterisk `*`,
that is, it stands for any of available value for a given field.

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

A typical use case is:

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

### Prerequisites

You need a working Kubernetes cluster at version >= 1.4 (for ScheduledJob), >= 1.5 (for CronJob),
with batch/v2alpha1 API turned on by passing `--runtime-config=batch/v2alpha1=true` while bringing up
You need a working Kubernetes cluster at version >= 1.8 (for CronJob). For previous versions of cluster (< 1.8)
you need to explicitly enable `batch/v2alpha1` API by passing `--runtime-config=batch/v2alpha1=true` to
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)
for more).

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/workloads/controllers/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v2alpha1
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: hello
Expand Down
18 changes: 0 additions & 18 deletions docs/user-guide/cronjob.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion docs/user-guide/kubectl-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ In order for `kubectl run` to satisfy infrastructure as code:
* Deployment, using `extensions/v1beta1` endpoint - use `deployment/v1beta1` (default).
* Deployment, using `apps/v1beta1` endpoint - use `deployment/apps.v1beta1` (recommended).
* Job - use `job/v1`.
* CronJob - use `cronjob/v2alpha1`.
* CronJob - using `batch/v1beta1` endpoint - use `cronjob/v1beta1`(default).
* CronJob - using `batch/v2alpha1` endpoint - use `cronjob/v2alpha1` (deprecated).

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

0 comments on commit 8ec205f

Please sign in to comment.