Make exec more consistent with the rest of the kubectl commands.

This commit is contained in:
Brendan Burns
2015-05-20 16:00:19 -07:00
parent b7caedeedb
commit 2ec4b409e1
7 changed files with 103 additions and 28 deletions

View File

@@ -141,11 +141,14 @@ Execute a command in a container.
.RS
.nf
// get output from running 'date' from pod 123456\-7890, using the first container by default
$ kubectl exec 123456\-7890 date
// get output from running 'date' in ruby\-container from pod 123456\-7890
$ kubectl exec \-p 123456\-7890 \-c ruby\-container date
$ kubectl exec 123456\-7890 \-c ruby\-container date
//switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780 and sends stdout/stderr from 'bash' back to the client
$ kubectl exec \-p 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il
$ kubectl exec 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il
.fi
.RE