Skip to content

Commit de02f2f

Browse files
authored
Merge pull request #22054 from soltysh/kubectl_run_updates
Update kubectl run from docs where necessary
2 parents d252bcf + 00f502f commit de02f2f

File tree

6 files changed

+13
-22
lines changed

6 files changed

+13
-22
lines changed

content/en/docs/concepts/configuration/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The caching semantics of the underlying image provider make even `imagePullPolic
103103

104104
- Use label selectors for `get` and `delete` operations instead of specific object names. See the sections on [label selectors](/docs/concepts/overview/working-with-objects/labels/#label-selectors) and [using labels effectively](/docs/concepts/cluster-administration/manage-deployment/#using-labels-effectively).
105105

106-
- Use `kubectl run` and `kubectl expose` to quickly create single-container Deployments and Services. See [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) for an example.
106+
- Use `kubectl create deployment` and `kubectl expose` to quickly create single-container Deployments and Services. See [Use a Service to Access an Application in a Cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) for an example.
107107

108108

109109

content/en/docs/concepts/overview/working-with-objects/object-management.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ objects, it provides no history of previous configurations.
4040

4141
Run an instance of the nginx container by creating a Deployment object:
4242

43-
```sh
44-
kubectl run nginx --image nginx
45-
```
46-
47-
Do the same thing using a different syntax:
48-
4943
```sh
5044
kubectl create deployment nginx --image nginx
5145
```

content/en/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Modification not using HostAliases is not suggested because the file is managed
2323
Start an Nginx Pod which is assigned a Pod IP:
2424

2525
```shell
26-
kubectl run nginx --image nginx --generator=run-pod/v1
26+
kubectl run nginx --image nginx
2727
```
2828

2929
```
@@ -64,7 +64,7 @@ By default, the `hosts` file only includes IPv4 and IPv6 boilerplates like
6464
## Adding additional entries with hostAliases
6565

6666
In addition to the default boilerplate, you can add additional entries to the
67-
`hosts` file.
67+
`hosts` file.
6868
For example: to resolve `foo.local`, `bar.local` to `127.0.0.1` and `foo.remote`,
6969
`bar.remote` to `10.1.2.3`, you can configure HostAliases for a Pod under
7070
`.spec.hostAliases`:

content/en/docs/contribute/style/style-guide.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ document, use the backtick (`` ` ``).
121121
{{< table caption = "Do and Don't - Use code style for inline code and commands" >}}
122122
Do | Don't
123123
:--| :-----
124-
The `kubectl run`command creates a Deployment. | The "kubectl run" command creates a Deployment.
124+
The `kubectl run`command creates a Pod. | The "kubectl run" command creates a Pod.
125125
For declarative management, use `kubectl apply`. | For declarative management, use "kubectl apply".
126126
Enclose code samples with triple backticks. (\`\`\`)| Enclose code samples with any other syntax.
127127
Use single backticks to enclose inline code. For example, `var example = true`. | Use two asterisks (`**`) or an underscore (`_`) to enclose inline code. For example, **var example = true**.
@@ -496,7 +496,7 @@ Do | Don't
496496
:--| :-----
497497
You can explore the API using a browser. | The API can be explored using a browser.
498498
The YAML file specifies the replica count. | The replica count is specified in the YAML file.
499-
{{< /table >}}
499+
{{< /table >}}
500500
501501
502502
Exception: Use passive voice if active voice leads to an awkward construction.
@@ -511,7 +511,7 @@ Do | Don't
511511
To create a ReplicaSet, ... | In order to create a ReplicaSet, ...
512512
See the configuration file. | Please see the configuration file.
513513
View the Pods. | With this next command, we'll view the Pods.
514-
{{< /table >}}
514+
{{< /table >}}
515515
516516
### Address the reader as "you"
517517
@@ -520,7 +520,7 @@ Do | Don't
520520
:--| :-----
521521
You can create a Deployment by ... | We'll create a Deployment by ...
522522
In the preceding output, you can see... | In the preceding output, we can see ...
523-
{{< /table >}}
523+
{{< /table >}}
524524
525525
526526
### Avoid Latin phrases
@@ -532,7 +532,7 @@ Do | Don't
532532
:--| :-----
533533
For example, ... | e.g., ...
534534
That is, ...| i.e., ...
535-
{{< /table >}}
535+
{{< /table >}}
536536
537537
538538
Exception: Use "etc." for et cetera.
@@ -550,7 +550,7 @@ Do | Don't
550550
Version 1.4 includes ... | In version 1.4, we have added ...
551551
Kubernetes provides a new feature for ... | We provide a new feature ...
552552
This page teaches you how to use Pods. | In this page, we are going to learn about Pods.
553-
{{< /table >}}
553+
{{< /table >}}
554554
555555
556556
### Avoid jargon and idioms
@@ -562,7 +562,7 @@ Do | Don't
562562
:--| :-----
563563
Internally, ... | Under the hood, ...
564564
Create a new cluster. | Turn up a new cluster.
565-
{{< /table >}}
565+
{{< /table >}}
566566
567567
568568
### Avoid statements about the future
@@ -581,7 +581,7 @@ Do | Don't
581581
:--| :-----
582582
In version 1.4, ... | In the current version, ...
583583
The Federation feature provides ... | The new Federation feature provides ...
584-
{{< /table >}}
584+
{{< /table >}}
585585
586586
587587

content/en/docs/reference/kubectl/docker-cli-to-kubectl.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ kubectl run [-i] [--tty] --attach <name> --image=<image>
7373
Unlike `docker run ...`, if you specify `--attach`, then you attach `stdin`, `stdout` and `stderr`. You cannot control which streams are attached (`docker -a ...`).
7474
To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.
7575

76-
Because the kubectl run command starts a Deployment for the container, the Deployment restarts if you terminate the attached process by using Ctrl+C, unlike `docker run -it`.
77-
To destroy the Deployment and its pods you need to run `kubectl delete deployment <name>`.
78-
7976
## docker ps
8077

8178
To list what is currently running, see [kubectl get](/docs/reference/generated/kubectl/kubectl-commands/#get).
@@ -188,7 +185,7 @@ docker exec -ti 55c103fa1296 /bin/sh
188185
kubectl:
189186

190187
```shell
191-
kubectl exec -ti nginx-app-5jyvm -- /bin/sh
188+
kubectl exec -ti nginx-app-5jyvm -- /bin/sh
192189
# exit
193190
```
194191

content/en/docs/tutorials/kubernetes-basics/scale/scale-intro.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h3>Summary:</h3>
4040
</ul>
4141
</div>
4242
<div class="content__box content__box_fill">
43-
<p><i> You can create from the start a Deployment with multiple instances using the --replicas parameter for the kubectl run command </i></p>
43+
<p><i> You can create from the start a Deployment with multiple instances using the --replicas parameter for the kubectl create deployment command </i></p>
4444
</div>
4545
</div>
4646
</div>

0 commit comments

Comments
 (0)