How do I get Kubernetes metadata about the Pods in Fargate Logs?
I deployed the [eks-fargate-container-logs module](https://github.com/gruntwork-io/terraform-aws-eks/tree/master/modules/eks-fargate-container-logs) module as a part of [eks-core-services module](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/modules/services/eks-core-services). The log message is in a json object with a single key, `log`: ```json { "log": "2022-09-09T15:30:45.534811998Z stdout F " } ``` Is there anyway I can get more information, such as the pod labels? --- <ins datetime="2022-09-10T00:02:27Z"> <p><a href="https://support.gruntwork.io/hc/requests/109233">Tracked in ticket #109233</a></p> </ins>
This is because by default the Fargate `fluent-bit` instance does not extract the Kubernetes metadata from the pods when shipping the logs to the destination. You can configure the `fluent-bit` instance to scrape the metadata by configuring the `kubernetes` filter as an extra filter in the module. To do this, add the following to your module block or `inputs` map in `terragrunt.hcl` when calling the `eks-core-services` module: ```hcl fargate_fluent_bit_extra_filters = <<-EOF [FILTER] Name kubernetes Match kube.* Merge_Log On Buffer_Size 0 Kube_Meta_Cache_TTL 300s EOF ```