Container Logs
Dealing with Container Logs
TL;DR
- Print the Logs of a Container in a cluster
Summarizing Resources
Motivation
Debugging Workloads by printing out the Logs of containers in a cluster.
Print Logs for a Container in a Pod
Print the logs for a Pod running a single Container
kubectl logs echo-c6bc8ccff-nnj52
hello
hello
Operations
One can also perfrom debugging operations such as:
- Print Logs for all Pods for a Workload
- Follow Logs for a Container
- Printing Logs for a Container that has exited
- Selecting a Container in a Pod
- Printing Logs After a Time
- Printing Logs Since a Time
- Include Timestamps
and so on.
Command / Examples
Check out the reference for commands and examples.
当前内容版权归 kubernetes官网 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 kubernetes官网 .