Filebeat 7.10.2 : logging Configurations logging.files.rotateeverybytes not working

Hello All,

I am trying to rotate the logs generated by filebeat process by setting maximum file size of 1MB by configuring logging.files.rotateeverybytes: 1048576 but logs files are getting generated more than 10 MB and rotation is not happening.
Please find my filebeat logging configuration in my filebeat.yml as shown below:

  level: warning
  to_syslog: false
  to_files: true
    path: /var/log/filebeat
    name: filebeat.log
    keepfiles: 5
    rotateonstartup: false
    rotateeverybytes: 1048576

I have changed rotateonstartup as false hence i dont want filebeat process to create new log files for every startup. rotateeverybytes is not working as expected. Could you please help here.