I wanted to get my Kong logs into S3.
The approach I took is:
- Enable the File-log Kong plugin
- Add a FluentD sidecar container to the Kong deployment. The FluentD container tails the log file and ships the logs to S3
- Add a LogRotate sidecar container to rotate the log file, to avoid DoSing Kong in the long run
I’m mainly asking for validation of the above approach. Was this a good idea? Is there a more efficient way of getting this done?
Note that the Kong logs are the only logs in my cluster that need to be shipped to S3, hence the sidecar approach instead of a daemonset.