Search code examples
kubespray

Does kubespray install any log rotation policies?


I've looked through the GitHub (https://github.com/kubernetes-sigs/kubespray) project but I don't see references to log rotation.

Is there a standard approach?


Solution

  • kube-apiserver handles its own log rotation for the audit log using these parameters:

     - --audit-log-path=/var/log/apiserver/audit.log
     - --audit-log-maxbackup=10
     - --audit-log-maxage=30
     - --audit-log-maxsize=100
    

    If you are interested in using an audit log, the description at https://medium.com/faun/kubernetes-on-premise-cluster-auditing-eb8ff848fec4 is very good.