The article covers how to configure logging in AWS EKS using Fluent Bit and CloudWatch both directly and through the Amazon CloudWatch Observability add-on.
The Fluent Bit Helm chart is used in conjunction with FluxCD for installation.
The Tail Input is used to read log files located in /var/log/containers/*.log and send them to CloudWatch.
IAM Roles for Service Accounts (IRSA) must be set up and associated with the service account that Fluent Bit uses for it to work with AWS.
A volume is needed for Filesystem buffering, which helps to manage backpressure and overall memory control.
The Filter configuration is used to add Kubernetes metadata such as namespace and pod_name for enriched log data.
The Amazon CloudWatch Observability add-on installs the necessary resources to collect, aggregate, and create summaries for metrics and logs using CloudWatch agent and Fluent-Bit components.
Several DaemonSets are created in the cluster when the add-on is installed.
Customizations can be made to the add-on configurations, such as disabling Fluent Bit logs for Accelerated Compute monitoring or skipping collection of NVIDIA GPU metrics.
By default, the add-on creates four CloudWatch log groups for storing data, such as performance metrics on running pods, CPU usage, among others.