Introduction
Sometimes your app inside Kubernetes does not work as expected. You need to see what it is doing inside. The kubectl logs command shows the messages your app writes, helping you find problems.
When your app crashes or restarts and you want to see error messages.
When your app is running but not behaving correctly and you want to check its output.
When you want to verify that your app started successfully inside the pod.
When you want to see recent activity or debug information from your app.
When you want to check logs from a specific container in a pod with multiple containers.