<p>I want to add logrotate config file for pods and containers on aks node which is a linux machine. I was able to achieve it by login to the node in azure and manually adding them at <em>/etc/logrotate.d</em> path. But my code has cases where I may have to deploy again which removes those changes. How can I make it persist or add those config files such that they are created on aks node when deployed again?</p>

<p>FYI: I use arm templates for deployment.</p>

Mathew
<p>with AKS you shouldn't need to setup Log Rotate on the nodes itself to manage log rotation for container. </p>

<p>This is the responsibility of Docker and AKS properly configures the rotation of such logs. </p>

<pre><code>xinfra@aks-linux-vmss000000:~$ cat /etc/docker/daemon.json
{
  "live-restore": true,
  "log-driver": "json-file",
  "log-opts":  {
     "max-size": "50m",
     "max-file": "5"
  }
}
</code></pre>
