Quick Actions
kubectl logs
Description
Print the logs for a container in a pod.
Command
kubectl logs
Examples
View pod logs
kubectl logs my-pod
Follow logs
kubectl logs -f my-pod
Show last 100 lines
kubectl logs --tail=100 my-pod
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
-f |
string | No | Follow log output |
--tail |
string | No | Lines of recent log file to display |
-c |
string | No | Container name |
Command Info
Category:
Monitoring
Type:
Kubernetes
Views:
12
Status:
Active
Tags
logs
output
debugging