<p><a href="https://i.stack.imgur.com/eqwQh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eqwQh.png" alt="enter image description here" /></a></p>
<p>Using Kubernetes deploying nginx in several pods. Each pod is mounting access.log file to hostPath in order to read by Filebeat to collect to other output.</p>
<p>If do log rotation in the same cron time in every pod, they are using common access.log file, it works.</p>
<p>I tested with few data in a simple cluster. If large data occurred in production, is it a good plan or something wrong will happen with logrotate's design?</p>

iooi
<p>This will not usually work well since logrotate can't see the other nginx processes to sighup them. If nginx in particular can detect a rotation without a hup or other external poke then maybe, but most software cannot.</p>
<p>In general container logs should go to stdout or stderr and be handled by your container layer, which generally handles rotation itself or will include logrotate at the system level.</p>
