OpenShift deployment - pod console logs are truncated

2/12/2020

we are using OpenShift container platform (v3.11) for hosting our java application. We are writing application logs to standard pod console. However when I try to view pod logs or try to save logs to file, I am not getting complete log file instead getting only partial log (looks logs are truncated). I have tried to provide different options while viewing logs (like --since=48h etc..), but none of them worked.

Is there any way I can increase pod console buffer size or write complete log file contents to file.

-- Ran
kubernetes
openshift
openshift-3

1 Answer

2/12/2020

The better way is configuring log aggrigation via fluentd/elastic (see elk_logging), however there's an option to change docker log driver settings on the node with the running container (see managing_docker_container_logs or docker_logging_configure)

-- Oligzeev
Source: StackOverflow