Add optional arguments to kubectl run ...
This commit is contained in:
@@ -59,12 +59,22 @@ $ kubectl run nginx --image=nginx --dry-run
|
||||
|
||||
# Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON.
|
||||
$ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
|
||||
|
||||
# Start a single instance of nginx and keep it in the foreground, don't restart it if it exits.
|
||||
$ kubectl run -i -tty nginx --image=nginx --restart=Never
|
||||
|
||||
# Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command.
|
||||
$ kubectl run nginx --image=nginx -- <arg1> <arg2> ... <argN>
|
||||
|
||||
# Start the nginx container using a different command and custom arguments
|
||||
$ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
--attach[=false]: If true, wait for the Pod to start running, and then attach to the Pod as if 'kubectl attach ...' were called. Default false, unless '-i/--interactive' is set, in which case the default is true.
|
||||
--command[=false]: If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--generator="": The name of the API generator to use. Default is 'run/v1' if --restart=Always, otherwise the default is 'run-pod/v1'.
|
||||
-h, --help[=false]: help for run
|
||||
@@ -117,7 +127,7 @@ $ kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { .
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-12 23:41:01.307766241 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-13 16:41:44.465440991 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user