Openshift - policy to keep pod logs after termination

Viewed 253

https://docs.openshift.com/container-platform/4.5/support/troubleshooting/investigating-pod-issues.html

Says :

Depending on policy and exit code, pod and container logs remain available after pods have been terminated.

But, doesn't say which policy can I set to make pod logs available after termination. Or which exit codes keep the logs. Anyone got any ideas? Clearly it must be possible to keep the logs available after termination, but how?

(Yes, I know I could probably use some external logging solution. But I don't have one handy and it'd be a lot of work to stand one up in the dev env and do whatever changes to make the pod being developed send it's logs there, all of which is not valid in "prod" environment so needs removing before changes can go live. Whereas a change to a policy somewhere is totally outside the code that launches the pod, so I can leave it in place in dev and not worry about making changes before dev work can go live.)

0 Answers
Related