This module can be found on Github and Terraform Registry
The Container Insights Terraform Module is used to deploy AWS’ Container Insights agent onto a Kubernetes Cluster (EKS Specifically).
This allows for enabling deeper visibility into the operations of your K8 cluster via metrics and logs sent to AWS CloudWatch.
The module connects to the Kubernetes cluster via the management endpoint to run a custom-written Helm Chart.
This helm chart deploys the Container Insights Agent to the cluster as a DeamonSet and configures it to use IAM roles for service accounts, with an IAM Role this module also creates.
The module is based on the quickstart published by AWS and found here. This uses Fluent Bit for sending logs and the CloudWatch Agent for metrics.
Using this module:
- First add the helm provider to your Terraform code
|
|
- Then add the module itself:
|
|
It is recommended to deploy this in a separate Terraform Workspace than the one that created the EKS cluster for stability reasons.