Simply modify the Kubectl logs information

This commit is contained in:
navist2020 2021-03-01 14:56:27 +08:00
parent 6a9182c944
commit 1995f28c64

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