How to View Previous Pod Logs with Kubectl

To access logs from a previous instance of a Kubernetes pod, you can use the `--previous` flag with `kubectl logs`. This is particularly useful for troubleshooting pods that have crashed or restarted.

kubectl logs <pod-name> --previous

Replace `<pod-name>` with the name of your pod.