mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 05:01:46 +00:00
Merge pull request #8634 from csrwng/rename_pod_log
Rename 'kubectl log' to 'kubectl logs'
This commit is contained in:
@@ -16,7 +16,7 @@ kubectl_exec.md
|
||||
kubectl_expose.md
|
||||
kubectl_get.md
|
||||
kubectl_label.md
|
||||
kubectl_log.md
|
||||
kubectl_logs.md
|
||||
kubectl_namespace.md
|
||||
kubectl_port-forward.md
|
||||
kubectl_proxy.md
|
||||
|
@@ -54,7 +54,7 @@ kubectl
|
||||
* [kubectl expose](kubectl_expose.md) - Take a replicated application and expose it as Kubernetes Service
|
||||
* [kubectl get](kubectl_get.md) - Display one or many resources
|
||||
* [kubectl label](kubectl_label.md) - Update the labels on a resource
|
||||
* [kubectl log](kubectl_log.md) - Print the logs for a container in a pod.
|
||||
* [kubectl logs](kubectl_logs.md) - Print the logs for a container in a pod.
|
||||
* [kubectl namespace](kubectl_namespace.md) - SUPERCEDED: Set and view the current Kubernetes namespace
|
||||
* [kubectl port-forward](kubectl_port-forward.md) - Forward one or more local ports to a pod.
|
||||
* [kubectl proxy](kubectl_proxy.md) - Run a proxy to the Kubernetes API server
|
||||
|
@@ -1,4 +1,4 @@
|
||||
## kubectl log
|
||||
## kubectl logs
|
||||
|
||||
Print the logs for a container in a pod.
|
||||
|
||||
@@ -8,27 +8,27 @@ 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 log [-f] [-p] POD [CONTAINER]
|
||||
kubectl logs [-f] [-p] POD [CONTAINER]
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
// Returns snapshot of ruby-container logs from pod 123456-7890.
|
||||
$ kubectl log 123456-7890 ruby-container
|
||||
$ kubectl logs 123456-7890 ruby-container
|
||||
|
||||
// Returns snapshot of previous terminated ruby-container logs from pod 123456-7890.
|
||||
$ kubectl log -p 123456-7890 ruby-container
|
||||
$ kubectl logs -p 123456-7890 ruby-container
|
||||
|
||||
// Starts streaming of ruby-container logs from pod 123456-7890.
|
||||
$ kubectl log -f 123456-7890 ruby-container
|
||||
$ kubectl logs -f 123456-7890 ruby-container
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --follow=false: Specify if the logs should be streamed.
|
||||
-h, --help=false: help for log
|
||||
-h, --help=false: help for logs
|
||||
--interactive=true: If true, prompt the user for input when required. Default true.
|
||||
-p, --previous=false: If true, print the logs for the previous instance of the container in a pod if it exists.
|
||||
```
|
||||
@@ -65,6 +65,6 @@ $ kubectl log -f 123456-7890 ruby-container
|
||||
### SEE ALSO
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-05-15 00:05:04.551041505 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-05-21 20:24:03.06578685 +0000 UTC
|
||||
|
||||
[]()
|
||||
[]()
|
@@ -15,7 +15,7 @@ kubectl-exec.1
|
||||
kubectl-expose.1
|
||||
kubectl-get.1
|
||||
kubectl-label.1
|
||||
kubectl-log.1
|
||||
kubectl-logs.1
|
||||
kubectl-namespace.1
|
||||
kubectl-port-forward.1
|
||||
kubectl-proxy.1
|
||||
|
@@ -3,12 +3,12 @@
|
||||
|
||||
.SH NAME
|
||||
.PP
|
||||
kubectl log \- Print the logs for a container in a pod.
|
||||
kubectl logs \- Print the logs for a container in a pod.
|
||||
|
||||
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
\fBkubectl log\fP [OPTIONS]
|
||||
\fBkubectl logs\fP [OPTIONS]
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -23,7 +23,7 @@ Print the logs for a container in a pod. If the pod has only one container, the
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for log
|
||||
help for logs
|
||||
|
||||
.PP
|
||||
\fB\-\-interactive\fP=true
|
||||
@@ -138,13 +138,13 @@ Print the logs for a container in a pod. If the pod has only one container, the
|
||||
|
||||
.nf
|
||||
// Returns snapshot of ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log 123456\-7890 ruby\-container
|
||||
$ kubectl logs 123456\-7890 ruby\-container
|
||||
|
||||
// Returns snapshot of previous terminated ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log \-p 123456\-7890 ruby\-container
|
||||
$ kubectl logs \-p 123456\-7890 ruby\-container
|
||||
|
||||
// Starts streaming of ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log \-f 123456\-7890 ruby\-container
|
||||
$ kubectl logs \-f 123456\-7890 ruby\-container
|
||||
|
||||
.fi
|
||||
.RE
|
@@ -124,7 +124,7 @@ Find more information at
|
||||
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-log(1)\fP, \fBkubectl\-rolling\-update(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-cluster\-info(1)\fP, \fBkubectl\-api\-versions(1)\fP, \fBkubectl\-version(1)\fP,
|
||||
\fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-logs(1)\fP, \fBkubectl\-rolling\-update(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-cluster\-info(1)\fP, \fBkubectl\-api\-versions(1)\fP, \fBkubectl\-version(1)\fP,
|
||||
|
||||
|
||||
.SH HISTORY
|
||||
|
Reference in New Issue
Block a user