update generator table for kubectl run (#15146)
This commit is contained in:
parent
f3bb552f2a
commit
0f1c2b7e68
|
|
@ -36,15 +36,19 @@ For `kubectl run` to satisfy infrastructure as code:
|
||||||
|
|
||||||
You can create the following resources using `kubectl run` with the `--generator` flag:
|
You can create the following resources using `kubectl run` with the `--generator` flag:
|
||||||
|
|
||||||
| Resource | api group | kubectl command |
|
| Resource | api group | kubectl command |
|
||||||
|---------------------------------|--------------------|---------------------------------------------------|
|
|-------------------------------------|--------------------|---------------------------------------------------|
|
||||||
| Pod | v1 | `kubectl run --generator=run-pod/v1` |
|
| Pod | v1 | `kubectl run --generator=run-pod/v1` |
|
||||||
| Replication controller | v1 | `kubectl run --generator=run/v1` |
|
| Replication controller (deprecated) | v1 | `kubectl run --generator=run/v1` |
|
||||||
| Deployment (deprecated) | extensions/v1beta1 | `kubectl run --generator=deployment/v1beta1` |
|
| Deployment (deprecated) | extensions/v1beta1 | `kubectl run --generator=deployment/v1beta1` |
|
||||||
| Deployment (deprecated) | apps/v1beta1 | `kubectl run --generator=deployment/apps.v1beta1` |
|
| Deployment (deprecated) | apps/v1beta1 | `kubectl run --generator=deployment/apps.v1beta1` |
|
||||||
| Job (deprecated) | batch/v1 | `kubectl run --generator=job/v1` |
|
| Job (deprecated) | batch/v1 | `kubectl run --generator=job/v1` |
|
||||||
| CronJob (default) | batch/v1beta1 | `kubectl run --generator=cronjob/v1beta1` |
|
| CronJob (deprecated) | batch/v1beta1 | `kubectl run --generator=cronjob/v1beta1` |
|
||||||
| CronJob (deprecated) | batch/v2alpha1 | `kubectl run --generator=cronjob/v2alpha1` |
|
| CronJob (deprecated) | batch/v2alpha1 | `kubectl run --generator=cronjob/v2alpha1` |
|
||||||
|
|
||||||
|
{{< note >}}
|
||||||
|
`kubectl run --generator` except for `run-pod/v1` is deprecated in v1.12.
|
||||||
|
{{< /note >}}
|
||||||
|
|
||||||
If you do not specify a generator flag, other flags prompt you to use a specific generator. The following table lists the flags that force you to use specific generators, depending on the version of the cluster:
|
If you do not specify a generator flag, other flags prompt you to use a specific generator. The following table lists the flags that force you to use specific generators, depending on the version of the cluster:
|
||||||
|
|
||||||
|
|
@ -74,4 +78,4 @@ flag, which provides the object to be submitted to the cluster.
|
||||||
|
|
||||||
* You can use `kubectl apply` to create or update resources. For more information about using kubectl apply to update resources, see [Kubectl Book](https://kubectl.docs.kubernetes.io).
|
* You can use `kubectl apply` to create or update resources. For more information about using kubectl apply to update resources, see [Kubectl Book](https://kubectl.docs.kubernetes.io).
|
||||||
|
|
||||||
{{% /capture %}}
|
{{% /capture %}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue