Merge pull request #99575 from navist2020/fix/logs_info

Simply modify the Kubectl logs information
This commit is contained in:
Kubernetes Prow Robot 2021-06-03 23:25:25 -07:00 committed by GitHub
commit 635f2c7c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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