Merge pull request #24365 from janetkuo/remove-t-for-tty

Automatic merge from submit-queue

Add flag -t as shorthand for --tty

`-t` was deprecated in #12813 (Aug. 2015, about 6+ months ago). 

Now remove `--template`'s shorthand `-t` and create a shorthand `-t` for `--tty` in `kubectl run`. 

@kubernetes/kubectl
This commit is contained in:
k8s-merge-robot
2016-04-28 00:23:11 -07:00
6 changed files with 14 additions and 58 deletions

View File

@@ -68,7 +68,7 @@ kubectl run nginx --image=nginx --dry-run
kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
# Start a single instance of busybox and keep it in the foreground, don't restart it if it exits.
kubectl run -i --tty busybox --image=busybox --restart=Never
kubectl run -i -t busybox --image=busybox --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>
@@ -113,7 +113,7 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
-i, --stdin[=false]: Keep stdin open on the container(s) in the pod, even if nothing is attached.
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
--tty[=false]: Allocated a TTY for each container in the pod. Because -t is currently shorthand for --template, -t is not supported for --tty. This shorthand is deprecated and we expect to adopt -t for --tty soon.
-t, --tty[=false]: Allocated a TTY for each container in the pod.
```
### Options inherited from parent commands
@@ -148,7 +148,7 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra on 5-Apr-2016
###### Auto generated by spf13/cobra on 15-Apr-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]()