Merge pull request #10519 from JanetKuo/kubectl-c

Enable -c for kubectl logs container arg
This commit is contained in:
Zach Loafman
2015-07-01 08:36:38 -07:00
4 changed files with 30 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ Print the logs for a container in a pod.
Print the logs for a container in a pod. If the pod has only one container, the container name is optional.
```
kubectl logs [-f] [-p] POD [CONTAINER]
kubectl logs [-f] [-p] POD [-c CONTAINER]
```
### Examples
@@ -27,6 +27,7 @@ $ kubectl logs -f 123456-7890 ruby-container
### Options
```
-c, --container="": Container name
-f, --follow=false: Specify if the logs should be streamed.
-h, --help=false: help for logs
--interactive=true: If true, prompt the user for input when required. Default true.
@@ -65,6 +66,6 @@ $ kubectl logs -f 123456-7890 ruby-container
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-21 20:24:03.06578685 +0000 UTC
###### Auto generated by spf13/cobra at 2015-06-30 16:27:32.981507725 +0000 UTC
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/kubectl_logs.md?pixel)]()

View File

@@ -17,6 +17,10 @@ Print the logs for a container in a pod. If the pod has only one container, the
.SH OPTIONS
.PP
\fB\-c\fP, \fB\-\-container\fP=""
Container name
.PP
\fB\-f\fP, \fB\-\-follow\fP=false
Specify if the logs should be streamed.