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 perform 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.Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified February 18, 2023: Fix some small doc typos (31e6c04)