Skip to content

Commit d4a47bd

Browse files
committed
rename run-container to run in kubectl
1 parent b8a808b commit d4a47bd

File tree

23 files changed

+89
-82
lines changed

23 files changed

+89
-82
lines changed

contrib/completions/bash/kubectl

+3-3
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ _kubectl_proxy()
537537
must_have_one_noun=()
538538
}
539539

540-
_kubectl_run-container()
540+
_kubectl_run()
541541
{
542-
last_command="kubectl_run-container"
542+
last_command="kubectl_run"
543543
commands=()
544544

545545
flags=()
@@ -901,7 +901,7 @@ _kubectl()
901901
commands+=("exec")
902902
commands+=("port-forward")
903903
commands+=("proxy")
904-
commands+=("run-container")
904+
commands+=("run")
905905
commands+=("stop")
906906
commands+=("expose")
907907
commands+=("label")

docs/.files_generated

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kubectl_port-forward.md
2222
kubectl_proxy.md
2323
kubectl_resize.md
2424
kubectl_rolling-update.md
25-
kubectl_run-container.md
25+
kubectl_run.md
2626
kubectl_stop.md
2727
kubectl_update.md
2828
kubectl_version.md

docs/cli-roadmap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ See also issues with the following labels:
4747
1. A fairly general-purpose way to specify fields on the command line during creation and update, not just from a config file
4848
1. Extensible API-based generator framework (i.e. invoke generators via an API/URL rather than building them into kubectl), so that complex client libraries don’t need to be rewritten in multiple languages, and so that the abstractions are available through all interfaces: API, CLI, UI, logs, ... [#5280](https://github.com/GoogleCloudPlatform/kubernetes/issues/5280)
4949
1. Need schema registry, and some way to invoke generator (e.g., using a container)
50-
1. Convert run-container to API-based generator
50+
1. Convert run command to API-based generator
5151
1. Transformation framework
5252
1. More intelligent defaulting of fields (e.g., [#2643](https://github.com/GoogleCloudPlatform/kubernetes/issues/2643))
5353
1. Update preconditions based on the values of arbitrary object fields.

docs/devel/developer-guides/vagrant.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ NAME IMAGE(S SELECTOR REPLICAS
191191
Start a container running nginx with a replication controller and three replicas
192192

193193
```
194-
$ cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=3 --port=80
194+
$ cluster/kubectl.sh run my-nginx --image=nginx --replicas=3 --port=80
195195
```
196196

197197
When listing the pods, you will see that three containers have been started and are in Waiting state:

docs/getting-started-guides/azure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The `kubectl.sh` line below spins up two containers running
4646
[Nginx](http://nginx.org/en/) running on port 80:
4747

4848
```bash
49-
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
49+
cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80
5050
```
5151

5252
To stop the containers:

docs/getting-started-guides/docker-multinode/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If the status of any node is ```Unknown``` or ```NotReady``` your cluster is bro
1818

1919
### Run an application
2020
```sh
21-
kubectl -s http://localhost:8080 run-container nginx --image=nginx --port=80
21+
kubectl -s http://localhost:8080 run nginx --image=nginx --port=80
2222
```
2323

2424
now run ```docker ps``` you should see nginx running. You may need to wait a few minutes for the image to get pulled.
@@ -31,7 +31,7 @@ kubectl expose rc nginx --port=80
3131
This should print:
3232
```
3333
NAME LABELS SELECTOR IP PORT(S)
34-
nginx <none> run-container=nginx <ip-addr> 80/TCP
34+
nginx <none> run=nginx <ip-addr> 80/TCP
3535
```
3636

3737
Hit the webserver:

docs/getting-started-guides/docker.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you are running different kubernetes clusters, you may need to specify ```-s
5151

5252
### Run an application
5353
```sh
54-
kubectl -s http://localhost:8080 run-container nginx --image=nginx --port=80
54+
kubectl -s http://localhost:8080 run nginx --image=nginx --port=80
5555
```
5656

5757
now run ```docker ps``` you should see nginx running. You may need to wait a few minutes for the image to get pulled.
@@ -64,7 +64,7 @@ kubectl expose rc nginx --port=80
6464
This should print:
6565
```
6666
NAME LABELS SELECTOR IP PORT(S)
67-
nginx <none> run-container=nginx <ip-addr> 80/TCP
67+
nginx <none> run=nginx <ip-addr> 80/TCP
6868
```
6969

7070
Hit the webserver:

docs/getting-started-guides/locally.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You can now use any of the cluster/kubectl.sh commands to interact with your loc
4747
cluster/kubectl.sh get pods
4848
cluster/kubectl.sh get services
4949
cluster/kubectl.sh get replicationcontrollers
50-
cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=2 --port=80
50+
cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80
5151
5252
5353
## begin wait for provision to complete, you can monitor the docker pull by opening a new terminal

docs/getting-started-guides/vagrant.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ NAME IMAGE(S SELECTOR REPLICAS
164164
Start a container running nginx with a replication controller and three replicas
165165
166166
```sh
167-
$ ./cluster/kubectl.sh run-container my-nginx --image=nginx --replicas=3 --port=80
167+
$ ./cluster/kubectl.sh run my-nginx --image=nginx --replicas=3 --port=80
168168
```
169169
170170
When listing the pods, you will see that three containers have been started and are in Waiting state:

docs/kubectl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ kubectl
6060
* [kubectl proxy](kubectl_proxy.md) - Run a proxy to the Kubernetes API server
6161
* [kubectl resize](kubectl_resize.md) - Set a new size for a Replication Controller.
6262
* [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController.
63-
* [kubectl run-container](kubectl_run-container.md) - Run a particular image on the cluster.
63+
* [kubectl run](kubectl_run.md) - Run a particular image on the cluster.
6464
* [kubectl stop](kubectl_stop.md) - Gracefully shut down a resource by id or filename.
6565
* [kubectl update](kubectl_update.md) - Update a resource by filename or stdin.
6666
* [kubectl version](kubectl_version.md) - Print the client and server version information.

docs/kubectl_run-container.md renamed to docs/kubectl_run.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## kubectl run-container
1+
## kubectl run
22

33
Run a particular image on the cluster.
44

@@ -9,34 +9,34 @@ Create and run a particular image, possibly replicated.
99
Creates a replication controller to manage the created container(s).
1010

1111
```
12-
kubectl run-container NAME --image=image [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json]
12+
kubectl run NAME --image=image [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json]
1313
```
1414

1515
### Examples
1616

1717
```
1818
// Starts a single instance of nginx.
19-
$ kubectl run-container nginx --image=nginx
19+
$ kubectl run nginx --image=nginx
2020
2121
// Starts a replicated instance of nginx.
22-
$ kubectl run-container nginx --image=nginx --replicas=5
22+
$ kubectl run nginx --image=nginx --replicas=5
2323
2424
// Dry run. Print the corresponding API objects without creating them.
25-
$ kubectl run-container nginx --image=nginx --dry-run
25+
$ kubectl run nginx --image=nginx --dry-run
2626
2727
// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON.
28-
$ kubectl run-container nginx --image=nginx --overrides='{ "apiVersion": "v1beta3", "spec": { ... } }'
28+
$ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1beta3", "spec": { ... } }'
2929
```
3030

3131
### Options
3232

3333
```
3434
--dry-run=false: If true, only print the object that would be sent, without sending it.
35-
--generator="run-container/v1": The name of the API generator to use. Default is 'run-container-controller/v1'.
36-
-h, --help=false: help for run-container
35+
--generator="run/v1": The name of the API generator to use. Default is 'run-controller/v1'.
36+
-h, --help=false: help for run
3737
--hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container.
3838
--image="": The image for the container to run.
39-
-l, --labels="": Labels to apply to the pod(s) created by this call to run-container.
39+
-l, --labels="": Labels to apply to the pod(s).
4040
--no-headers=false: When using the default output, don't print headers.
4141
-o, --output="": Output format. One of: json|yaml|template|templatefile.
4242
--output-version="": Output the formatted object with the given version (default api-version).
@@ -80,4 +80,4 @@ $ kubectl run-container nginx --image=nginx --overrides='{ "apiVersion": "v1beta
8080

8181
###### Auto generated by spf13/cobra at 2015-05-21 10:33:11.189857293 +0000 UTC
8282

83-
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_run-container.md?pixel)]()
83+
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_run.md?pixel)]()

docs/man/man1/.files_generated

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ kubectl-port-forward.1
2121
kubectl-proxy.1
2222
kubectl-resize.1
2323
kubectl-rolling-update.1
24-
kubectl-run-container.1
24+
kubectl-run.1
2525
kubectl-stop.1
2626
kubectl-update.1
2727
kubectl-version.1

docs/man/man1/kubectl-run-container.1 renamed to docs/man/man1/kubectl-run.1

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
.SH NAME
55
.PP
6-
kubectl run\-container \- Run a particular image on the cluster.
6+
kubectl run \- Run a particular image on the cluster.
77

88

99
.SH SYNOPSIS
1010
.PP
11-
\fBkubectl run\-container\fP [OPTIONS]
11+
\fBkubectl run\fP [OPTIONS]
1212

1313

1414
.SH DESCRIPTION
@@ -23,12 +23,12 @@ Creates a replication controller to manage the created container(s).
2323
If true, only print the object that would be sent, without sending it.
2424

2525
.PP
26-
\fB\-\-generator\fP="run\-container/v1"
27-
The name of the API generator to use. Default is 'run\-container\-controller/v1'.
26+
\fB\-\-generator\fP="run/v1"
27+
The name of the API generator to use. Default is 'run\-controller/v1'.
2828

2929
.PP
3030
\fB\-h\fP, \fB\-\-help\fP=false
31-
help for run\-container
31+
help for run
3232

3333
.PP
3434
\fB\-\-hostport\fP=\-1
@@ -40,7 +40,7 @@ Creates a replication controller to manage the created container(s).
4040

4141
.PP
4242
\fB\-l\fP, \fB\-\-labels\fP=""
43-
Labels to apply to the pod(s) created by this call to run\-container.
43+
Labels to apply to the pod(s).
4444

4545
.PP
4646
\fB\-\-no\-headers\fP=false
@@ -176,16 +176,16 @@ Creates a replication controller to manage the created container(s).
176176

177177
.nf
178178
// Starts a single instance of nginx.
179-
$ kubectl run\-container nginx \-\-image=nginx
179+
$ kubectl run nginx \-\-image=nginx
180180

181181
// Starts a replicated instance of nginx.
182-
$ kubectl run\-container nginx \-\-image=nginx \-\-replicas=5
182+
$ kubectl run nginx \-\-image=nginx \-\-replicas=5
183183

184184
// Dry run. Print the corresponding API objects without creating them.
185-
$ kubectl run\-container nginx \-\-image=nginx \-\-dry\-run
185+
$ kubectl run nginx \-\-image=nginx \-\-dry\-run
186186

187187
// Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON.
188-
$ kubectl run\-container nginx \-\-image=nginx \-\-overrides='\{ "apiVersion": "v1beta3", "spec": \{ ... \} \}'
188+
$ kubectl run nginx \-\-image=nginx \-\-overrides='\{ "apiVersion": "v1beta3", "spec": \{ ... \} \}'
189189

190190
.fi
191191
.RE

docs/man/man1/kubectl.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Find more information at
124124

125125
.SH SEE ALSO
126126
.PP
127-
\fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-logs(1)\fP, \fBkubectl\-rolling\-update(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-cluster\-info(1)\fP, \fBkubectl\-api\-versions(1)\fP, \fBkubectl\-version(1)\fP,
127+
\fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-logs(1)\fP, \fBkubectl\-rolling\-update(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-cluster\-info(1)\fP, \fBkubectl\-api\-versions(1)\fP, \fBkubectl\-version(1)\fP,
128128

129129

130130
.SH HISTORY

docs/replication-controller.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The replication controller simply ensures that the desired number of pods matche
3636

3737
The replication controller is forever constrained to this narrow responsibility. It itself will not perform readiness nor liveness probes. Rather than performing auto-scaling, it is intended to be controlled by an external auto-scaler (as discussed in [#492](https://github.com/GoogleCloudPlatform/kubernetes/issues/492)), which would change its `replicas` field. We will not add scheduling policies (e.g., [spreading](https://github.com/GoogleCloudPlatform/kubernetes/issues/367#issuecomment-48428019)) to replication controller. Nor should it verify that the pods controlled match the currently specified template, as that would obstruct auto-sizing and other automated processes. Similarly, completion deadlines, ordering dependencies, configuration expansion, and other features belong elsewhere. We even plan to factor out the mechanism for bulk pod creation ([#170](https://github.com/GoogleCloudPlatform/kubernetes/issues/170)).
3838

39-
The replication controller is intended to be a composable building-block primitive. We expect higher-level APIs and/or tools to be built on top of it and other complementary primitives for user convenience in the future. The "macro" operations currently supported by kubectl (run-container, stop, resize, rolling-update) are proof-of-concept examples of this. For instance, we could imagine something like [Asgard](http://techblog.netflix.com/2012/06/asgard-web-based-cloud-management-and.html) managing replication controllers, auto-scalers, services, scheduling policies, canaries, etc.
39+
The replication controller is intended to be a composable building-block primitive. We expect higher-level APIs and/or tools to be built on top of it and other complementary primitives for user convenience in the future. The "macro" operations currently supported by kubectl (run, stop, resize, rolling-update) are proof-of-concept examples of this. For instance, we could imagine something like [Asgard](http://techblog.netflix.com/2012/06/asgard-web-based-cloud-management-and.html) managing replication controllers, auto-scalers, services, scheduling policies, canaries, etc.
4040

4141
## Common usage patterns
4242

examples/kubernetes-namespaces/README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,22 @@ At this point, all requests we make to the Kubernetes cluster from the command l
184184
Let's create some content.
185185

186186
```shell
187-
$ cluster/kubectl.sh run-container snowflake --image=kubernetes/serve_hostname --replicas=2
187+
$ cluster/kubectl.sh run snowflake --image=kubernetes/serve_hostname --replicas=2
188188
```
189189

190190
We have just created a replication controller whose replica size is 2 that is running the pod called snowflake with a basic container that just serves the hostname.
191191

192192
```shell
193193
cluster/kubectl.sh get rc
194194
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
195-
snowflake snowflake kubernetes/serve_hostname run-container=snowflake 2
195+
snowflake snowflake kubernetes/serve_hostname run=snowflake 2
196196

197197
$ cluster/kubectl.sh get pods
198198
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE
199-
snowflake-mbrfi 10.244.2.4 kubernetes-minion-ilqx/104.197.8.214 run-container=snowflake Running About an hour
200-
snowflake kubernetes/serve_hostname Running About an hour
201-
snowflake-p78ev 10.244.2.5 kubernetes-minion-ilqx/104.197.8.214 run-container=snowflake Running About an hour
202-
snowflake kubernetes/serve_hostname Running About an hour
199+
snowflake-mbrfi 10.244.2.4 kubernetes-minion-ilqx/104.197.8.214 run=snowflake Running About an hour
200+
snowflake kubernetes/serve_hostname Running About an hour
201+
snowflake-p78ev 10.244.2.5 kubernetes-minion-ilqx/104.197.8.214 run=snowflake Running About an hour
202+
snowflake kubernetes/serve_hostname Running About an hour
203203
```
204204

205205
And this is great, developers are able to do what they want, and they do not have to worry about affecting content in the production namespace.
@@ -223,23 +223,23 @@ POD IP CONTAINER(S) IMAGE(S)
223223
Production likes to run cattle, so let's create some cattle pods.
224224

225225
```shell
226-
$ cluster/kubectl.sh run-container cattle --image=kubernetes/serve_hostname --replicas=5
226+
$ cluster/kubectl.sh run cattle --image=kubernetes/serve_hostname --replicas=5
227227

228228
$ cluster/kubectl.sh get rc
229229
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
230-
cattle cattle kubernetes/serve_hostname run-container=cattle 5
230+
cattle cattle kubernetes/serve_hostname run=cattle 5
231231

232232
$ cluster/kubectl.sh get pods
233233
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED MESSAGE
234-
cattle-1kyvj 10.244.0.4 kubernetes-minion-7s1y/23.236.54.97 run-container=cattle Running About an hour
235-
cattle kubernetes/serve_hostname Running About an hour
236-
cattle-kobrk 10.244.1.4 kubernetes-minion-cfs6/104.154.61.231 run-container=cattle Running About an hour
237-
cattle kubernetes/serve_hostname Running About an hour
238-
cattle-l1v9t 10.244.0.5 kubernetes-minion-7s1y/23.236.54.97 run-container=cattle Running About an hour
239-
cattle kubernetes/serve_hostname Running About an hour
240-
cattle-ne2sj 10.244.3.7 kubernetes-minion-x8gx/104.154.47.83 run-container=cattle Running About an hour
241-
cattle kubernetes/serve_hostname Running About an hour
242-
cattle-qrk4x 10.244.0.6 kubernetes-minion-7s1y/23.236.54.97 run-container=cattle Running About an hour
234+
cattle-1kyvj 10.244.0.4 kubernetes-minion-7s1y/23.236.54.97 run=cattle Running About an hour
235+
cattle kubernetes/serve_hostname Running About an hour
236+
cattle-kobrk 10.244.1.4 kubernetes-minion-cfs6/104.154.61.231 run=cattle Running About an hour
237+
cattle kubernetes/serve_hostname Running About an hour
238+
cattle-l1v9t 10.244.0.5 kubernetes-minion-7s1y/23.236.54.97 run=cattle Running About an hour
239+
cattle kubernetes/serve_hostname Running About an hour
240+
cattle-ne2sj 10.244.3.7 kubernetes-minion-x8gx/104.154.47.83 run=cattle Running About an hour
241+
cattle kubernetes/serve_hostname Running About an hour
242+
cattle-qrk4x 10.244.0.6 kubernetes-minion-7s1y/23.236.54.97 run=cattle Running About an hour
243243
cattle kubernetes/serve_hostname
244244
```
245245

examples/simple-nginx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `kubectl` line below spins up two containers running
1212
[Nginx](http://nginx.org/en/) running on port 80:
1313

1414
```bash
15-
kubectl run-container my-nginx --image=nginx --replicas=2 --port=80
15+
kubectl run my-nginx --image=nginx --replicas=2 --port=80
1616
```
1717

1818
Once the pods are created, you can list them to see what is up and running:

0 commit comments

Comments
 (0)