k8s | Pod Logs | Basic
An article on a simple k8s pod logs using kubectl.
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 ! 馃檹
Comments
Join the discussionNo comments yet. Be the first to comment.