mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #99575 from navist2020/fix/logs_info
Simply modify the Kubectl logs information
This commit is contained in:
commit
635f2c7c2a
@ -58,7 +58,7 @@ var (
|
|||||||
kubectl logs nginx --all-containers=true
|
kubectl logs nginx --all-containers=true
|
||||||
|
|
||||||
# Return snapshot logs from all containers in pods defined by label app=nginx
|
# Return snapshot logs from all containers in pods defined by label app=nginx
|
||||||
kubectl logs -lapp=nginx --all-containers=true
|
kubectl logs -l app=nginx --all-containers=true
|
||||||
|
|
||||||
# Return snapshot of previous terminated ruby container logs from pod web-1
|
# 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
|
||||||
@ -67,7 +67,7 @@ var (
|
|||||||
kubectl logs -f -c ruby web-1
|
kubectl logs -f -c ruby web-1
|
||||||
|
|
||||||
# Begin streaming the logs from all containers in pods defined by label app=nginx
|
# Begin streaming the logs from all containers in pods defined by label app=nginx
|
||||||
kubectl logs -f -lapp=nginx --all-containers=true
|
kubectl logs -f -l app=nginx --all-containers=true
|
||||||
|
|
||||||
# Display only the most recent 20 lines of output in pod nginx
|
# Display only the most recent 20 lines of output in pod nginx
|
||||||
kubectl logs --tail=20 nginx
|
kubectl logs --tail=20 nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user