Skip to content
Workload inspectionKubernetes

kubectl logs

Stream container logs or view historical entries.

Command
kubectl logs -c -n

Example usage

Review log output per container, including crashed instances.

kubectl logs <pod> -c <container> -n <namespace>
kubectl logs <pod> --previous

Related tags

Workload inspectionk8skubectlclusters