mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Introduce --previous option to kubectl log
This commit is contained in:
@@ -29,6 +29,10 @@ Print the logs for a container in a pod. If the pod has only one container, the
|
||||
\fB\-\-interactive\fP=true
|
||||
If true, prompt the user for input when required. Default true.
|
||||
|
||||
.PP
|
||||
\fB\-p\fP, \fB\-\-previous\fP=false
|
||||
If true, print the logs for the previous instance of the container in a pod if it exists.
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
@@ -140,6 +144,9 @@ Print the logs for a container in a pod. If the pod has only one container, the
|
||||
// Returns snapshot of ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log 123456\-7890 ruby\-container
|
||||
|
||||
// Returns snapshot of previous terminated ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log \-p 123456\-7890 ruby\-container
|
||||
|
||||
// Starts streaming of ruby\-container logs from pod 123456\-7890.
|
||||
$ kubectl log \-f 123456\-7890 ruby\-container
|
||||
|
||||
|
Reference in New Issue
Block a user