Skip to content

Commit bd8267d

Browse files
committed
rm informatio about generators from conventions
1 parent caf5a0d commit bd8267d

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

content/en/docs/reference/kubectl/conventions.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,46 +28,9 @@ For `kubectl run` to satisfy infrastructure as code:
2828

2929
* Tag the image with a version-specific tag and don't move that tag to a new version. For example, use `:v1234`, `v1.2.3`, `r03062016-1-4`, rather than `:latest` (For more information, see [Best Practices for Configuration](/docs/concepts/configuration/overview/#container-images)).
3030
* Capture the parameters in a checked-in script, or at least use `--record` to annotate the created objects with the command line for an image that is lightly parameterized.
31-
* Pin to a specific [generator](#generators) version, such as `kubectl run --generator=run-pod/v1`.
3231
* Check in the script for an image that is heavily parameterized.
3332
* Switch to configuration files checked into source control for features that are needed, but not expressible via `kubectl run` flags.
3433

35-
#### Generators
36-
37-
You can create the following resources using `kubectl run` with the `--generator` flag:
38-
39-
{{< table caption="Resources you can create using kubectl run" >}}
40-
| Resource | API group | kubectl command |
41-
|--------------------------------------|--------------------|---------------------------------------------------|
42-
| Pod | v1 | `kubectl run --generator=run-pod/v1` |
43-
| ReplicationController _(deprecated)_ | v1 | `kubectl run --generator=run/v1` |
44-
| Deployment _(deprecated)_ | extensions/v1beta1 | `kubectl run --generator=deployment/v1beta1` |
45-
| Deployment _(deprecated)_ | apps/v1beta1 | `kubectl run --generator=deployment/apps.v1beta1` |
46-
| Job _(deprecated)_ | batch/v1 | `kubectl run --generator=job/v1` |
47-
| CronJob _(deprecated)_ | batch/v2alpha1 | `kubectl run --generator=cronjob/v2alpha1` |
48-
| CronJob _(deprecated)_ | batch/v1beta1 | `kubectl run --generator=cronjob/v1beta1` |
49-
{{< /table >}}
50-
51-
{{< note >}}
52-
Generators other than `run-pod/v1` are deprecated.
53-
{{< /note >}}
54-
55-
If you explicitly set `--generator`, kubectl uses the generator you specified. If you invoke `kubectl run` and don't specify a generator, kubectl automatically selects which generator to use based on the other flags you set. The following table lists flags and the generators that are activated if you didn't specify one yourself:
56-
57-
{{< table caption="kubectl run flags and the resource they imply" >}}
58-
| Flag | Generated Resource |
59-
|-------------------------|-----------------------|
60-
| `--schedule=<schedule>` | CronJob |
61-
| `--restart=Always` | Deployment |
62-
| `--restart=OnFailure` | Job |
63-
| `--restart=Never` | Pod |
64-
{{< /table >}}
65-
66-
If you don't specify a generator, kubectl pays attention to other flags in the following order:
67-
68-
1. `--schedule`
69-
1. `--restart`
70-
7134
You can use the `--dry-run` flag to preview the object that would be sent to your cluster, without really submitting it.
7235

7336
### `kubectl apply`

0 commit comments

Comments
 (0)