Is it possible to save log of k8s container pod that terminates with error?

Hello. Thank you for your hard work.

Checking for loki introduction.
When the container pod in k8s is started and terminated with an error,
Can you save the log of that pod?
It is necessary to check what error the pod has terminated.

thank you.