My k8s pod gets terminated/crashed sometimes and restarts automatically. When I try to see the old log to debug for the crash, I get the below error. If terminated container not found, then how can I get the log and debug the crash in this case?
My pod has only one container inside it.
/home/ravi> sudo kubectl logs -p mypod-766c995f8b-zshgc -n ricplt
Error from server (BadRequest): previous terminated container "container-ricplt-e2term" in pod "mypod-766c995f8b-zshgc" not found