Skip to main content

k8s | Pod Logs | Basic

An article on a simple k8s pod logs using kubectl.

Updated 1 min readMarkdown
Part of seriesDevOps

TL;DR

There are at times when we need to check what's happening in a pod we automatically move to service or pod description before checking logs of the pod itself.

# Check logs of the pod
kubectl logs <pod>

# Check logs of the container of a specific pod
kubectl logs <pod> -c <container>

# Check live logs of a container
kubectl logs <pod> -f

These commands help troubleshoot at a very low level of the pod running with problems and can reduce time to recover.

Thanks for reading till here ! 馃檹

No comments yet. Be the first to comment.