Refdocs for 1.2 import

This commit is contained in:
John Mulhausen
2016-03-07 16:51:25 +00:00
parent 0a20f23ad9
commit a777a06bb1
69 changed files with 34475 additions and 19307 deletions
+9 -23
View File
@@ -1,7 +1,3 @@
---
layout: docwithnav
title: "kubectl logs"
---
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
@@ -17,56 +13,48 @@ 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.
```
{% raw %}
kubectl logs [-f] [-p] POD [-c CONTAINER]
{% endraw %}
```
### Examples
```
{% raw %}
# Return snapshot logs from pod nginx with only one container
$ kubectl logs nginx
kubectl logs nginx
# Return snapshot of previous terminated ruby container logs from pod web-1
$ kubectl logs -p -c ruby web-1
kubectl logs -p -c ruby web-1
# Begin streaming the logs of the ruby container in pod web-1
$ kubectl logs -f -c ruby web-1
kubectl logs -f -c ruby web-1
# Display only the most recent 20 lines of output in pod nginx
$ kubectl logs --tail=20 nginx
kubectl logs --tail=20 nginx
# Show all logs from pod nginx written in the last hour
$ kubectl logs --since=1h nginx
{% endraw %}
kubectl logs --since=1h nginx
```
### Options
```
{% raw %}
-c, --container="": Container name
-c, --container="": Print the logs of this container
-f, --follow[=false]: Specify if the logs should be streamed.
--interactive[=true]: If true, prompt the user for input when required. Default true.
--limit-bytes=0: Maximum bytes of logs to return. Defaults to no limit.
-p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists.
--since=0: Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.
--since-time="": Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.
--tail=-1: Lines of recent log file to display. Defaults to -1, showing all log lines.
--timestamps[=false]: Include timestamps on each line in the log output
{% endraw %}
```
### Options inherited from parent commands
```
{% raw %}
--alsologtostderr[=false]: log to standard error as well as files
--api-version="": The API version to use when talking to the server
--certificate-authority="": Path to a cert. file for the certificate authority.
--client-certificate="": Path to a client key file for TLS.
--client-certificate="": Path to a client certificate file for TLS.
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
@@ -86,14 +74,13 @@ $ kubectl logs --since=1h nginx
--username="": Username for basic authentication to the API server.
--v=0: log level for V logs
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
{% endraw %}
```
### SEE ALSO
* [kubectl](kubectl.html) - kubectl controls the Kubernetes cluster manager
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-16 18:54:52.319210951 +0000 UTC
###### Auto generated by spf13/cobra on 29-Feb-2016
@@ -105,4 +92,3 @@ $ kubectl logs --since=1h nginx
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_logs.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->